Added a helper function writing a bitmap from an image that has a stride that is not width * <bytes per pixel>