Fix T102421: Image.save() not respecting set image.file_format
The default file type for new ImBuf is already PNG, no need to override it again in the save method.
This commit is contained in:
parent
c024d6f47d
commit
981245fc6f
Notes:
blender-bot
2023-02-14 05:22:18 +01:00
Referenced by issue #100749, Blender LTS: Maintenance Task 3.3 Referenced by issue #102421, Image.save() more heavy than original when using bpy
|
@ -117,16 +117,10 @@ bool BKE_image_save_options_init(ImageSaveOptions *opts,
|
|||
}
|
||||
}
|
||||
else {
|
||||
if (ima->source == IMA_SRC_GENERATED) {
|
||||
opts->im_format.imtype = R_IMF_IMTYPE_PNG;
|
||||
opts->im_format.compress = ibuf->foptions.quality;
|
||||
opts->im_format.planes = ibuf->planes;
|
||||
if (!IMB_colormanagement_space_name_is_data(ima_colorspace)) {
|
||||
ima_colorspace = IMB_colormanagement_role_colorspace_name_get(COLOR_ROLE_DEFAULT_BYTE);
|
||||
}
|
||||
}
|
||||
else {
|
||||
BKE_image_format_from_imbuf(&opts->im_format, ibuf);
|
||||
BKE_image_format_from_imbuf(&opts->im_format, ibuf);
|
||||
if (ima->source == IMA_SRC_GENERATED &&
|
||||
!IMB_colormanagement_space_name_is_data(ima_colorspace)) {
|
||||
ima_colorspace = IMB_colormanagement_role_colorspace_name_get(COLOR_ROLE_DEFAULT_BYTE);
|
||||
}
|
||||
|
||||
/* use the multiview image settings as the default */
|
||||
|
|
Loading…
Reference in New Issue