diff options
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index a4eef2f9230..df3a7630bb0 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -1580,24 +1580,7 @@ void BKE_imbuf_to_image_format(struct ImageFormatData *im_format, const ImBuf *i } /* planes */ - /* TODO(sergey): Channels doesn't correspond actual planes used for image buffer - * For example byte buffer will have 4 channels but it might easily - * be BW or RGB image. - * - * Need to use im_format->planes = imbuf->planes instead? - */ - switch (imbuf->channels) { - case 0: - case 4: im_format->planes = R_IMF_PLANES_RGBA; - break; - case 3: im_format->planes = R_IMF_PLANES_RGB; - break; - case 1: im_format->planes = R_IMF_PLANES_BW; - break; - default: im_format->planes = R_IMF_PLANES_RGB; - break; - } - + im_format->planes = imbuf->planes; } |