diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-12-19 15:17:40 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-12-19 15:20:12 +0400 |
commit | b0c4133c67ce5fca7c3aa5abbd5a745c3d812525 (patch) | |
tree | 0c2374259ba7dc9033ffceb16bd7872c0142ab35 /source/blender/blenkernel/intern/image.c | |
parent | 01745d359eda2f81f25aa23d76000af9e58f761b (diff) |
Followup for fix T37718: image was not saving with proper settings second time
This was actually a regression after color management re-implementation, need
to copy settings from saved image buffer to an original one since they might
be modified during save.
Also noticed image format planes detection didn't work properly from an image
buffer. Made it so save operator works fine now, but also marked a TODO in
BKE_imbuf_to_image_format() which needs to be investigated further.
Diffstat (limited to 'source/blender/blenkernel/intern/image.c')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 74e32d9f53c..3d59b719ca0 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -1497,6 +1497,12 @@ 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; |