[Bf-blender-cvs] [21fdb0d92b6] master: Fix T101329: EXR 'JPG Preview' doesn't use color space anymore

Lukas Stockner noreply at git.blender.org
Sat Oct 22 18:26:10 CEST 2022


Commit: 21fdb0d92b6697cba252a1e8080b19012efa8383
Author: Lukas Stockner
Date:   Sat Oct 22 18:15:02 2022 +0200
Branches: master
https://developer.blender.org/rB21fdb0d92b6697cba252a1e8080b19012efa8383

Fix T101329: EXR 'JPG Preview' doesn't use color space anymore

For the JPG preview, the only thing that was changed in the image
format was the format itself. However, the colorspace code now also
checks the bitdepth through BKE_image_format_is_byte, so the depth
needs to be explicitly set to 8-bit for the JPG preview output.

===================================================================

M	source/blender/blenkernel/intern/image_save.cc

===================================================================

diff --git a/source/blender/blenkernel/intern/image_save.cc b/source/blender/blenkernel/intern/image_save.cc
index 4e47e71fb2b..003211e6288 100644
--- a/source/blender/blenkernel/intern/image_save.cc
+++ b/source/blender/blenkernel/intern/image_save.cc
@@ -968,6 +968,7 @@ bool BKE_image_render_write(ReportList *reports,
         /* optional preview images for exr */
         if (ok && (image_format.flag & R_IMF_FLAG_PREVIEW_JPG)) {
           image_format.imtype = R_IMF_IMTYPE_JPEG90;
+          image_format.depth = R_IMF_CHAN_DEPTH_8;
 
           if (BLI_path_extension_check(filepath, ".exr")) {
             filepath[strlen(filepath) - 4] = 0;
@@ -1025,6 +1026,7 @@ bool BKE_image_render_write(ReportList *reports,
       /* optional preview images for exr */
       if (ok && is_exr_rr && (image_format.flag & R_IMF_FLAG_PREVIEW_JPG)) {
         image_format.imtype = R_IMF_IMTYPE_JPEG90;
+        image_format.depth = R_IMF_CHAN_DEPTH_8;
 
         if (BLI_path_extension_check(filepath, ".exr")) {
           filepath[strlen(filepath) - 4] = 0;



More information about the Bf-blender-cvs mailing list