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.
This commit is contained in:
Sergey Sharybin 2013-04-29 09:56:01 +00:00
parent abf1df03eb
commit 409a1d5c01

@ -1218,14 +1218,17 @@ static int save_image_options_init(SaveImageOptions *simopts, SpaceImage *sima,
simopts->im_format = scene->r.im_format; simopts->im_format = scene->r.im_format;
is_depth_set = TRUE; is_depth_set = TRUE;
} }
else if (ima->source == IMA_SRC_GENERATED) {
simopts->im_format.imtype = R_IMF_IMTYPE_PNG;
}
else { 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->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)); BLI_strncpy(simopts->filepath, ibuf->name, sizeof(simopts->filepath));