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:
authorLukas Stockner <lukas.stockner@freenet.de>2022-10-22 19:15:02 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2022-10-22 19:17:01 +0300
commit21fdb0d92b6697cba252a1e8080b19012efa8383 (patch)
tree03366ae65013543c6f4e40d88224df8c30f00847
parent588db6152aaa8b8db55f8f3180787befc4238684 (diff)
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.
-rw-r--r--source/blender/blenkernel/intern/image_save.cc2
1 files changed, 2 insertions, 0 deletions
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;