Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-12-19 15:17:40 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-12-19 15:20:12 +0400
commitb0c4133c67ce5fca7c3aa5abbd5a745c3d812525 (patch)
tree0c2374259ba7dc9033ffceb16bd7872c0142ab35 /source/blender/blenkernel
parent01745d359eda2f81f25aa23d76000af9e58f761b (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')
-rw-r--r--source/blender/blenkernel/intern/image.c6
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;