From 409a1d5c01f012cf883e1a896861396f24ca4d00 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 29 Apr 2013 09:56:01 +0000 Subject: Fix #35139] Output panel options are not taken into account when you safe your render (JPG) Was caused by svn rev53181, and it worked before because image buffer didn't have quality set and in this case fall back to scene settings happened. Now or render result quality from scene settings is always used, image buffer's settings is ignored. --- source/blender/editors/space_image/image_ops.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'source/blender/editors/space_image') diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 96b45732433..ecbe4957c1b 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1218,14 +1218,17 @@ static int save_image_options_init(SaveImageOptions *simopts, SpaceImage *sima, simopts->im_format = scene->r.im_format; is_depth_set = TRUE; } - else if (ima->source == IMA_SRC_GENERATED) { - simopts->im_format.imtype = R_IMF_IMTYPE_PNG; - } else { - BKE_imbuf_to_image_format(&simopts->im_format, ibuf); + if (ima->source == IMA_SRC_GENERATED) { + simopts->im_format.imtype = R_IMF_IMTYPE_PNG; + } + else { + BKE_imbuf_to_image_format(&simopts->im_format, ibuf); + simopts->im_format.quality = ibuf->ftype & 0xff; + } + simopts->im_format.quality = ibuf->ftype & 0xff; } //simopts->subimtype = scene->r.subimtype; /* XXX - this is lame, we need to make these available too! */ - simopts->im_format.quality = ibuf->ftype & 0xff; BLI_strncpy(simopts->filepath, ibuf->name, sizeof(simopts->filepath)); -- cgit v1.2.3