diff options
author | Brecht Van Lommel <brecht> | 2022-05-13 17:03:26 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-05-13 18:55:54 +0300 |
commit | 5baa3ecda66337c0584f0bc6c6e7af0a6c0f6320 (patch) | |
tree | b751cbb3fbbe257bff0a85ad5c39d2643e172323 /source/blender/compositor | |
parent | 1e4cd98f0a948fbd947f79c220e7834c99a44f65 (diff) |
Color Management: various improvements and fixes for image saving
* Respect the image file color space setitng for saving in various cases where
it was previously ignored. Previously it would often use the sRGB or Linear
color space even when not selected.
* For the Save As operator, add a Color Space option in the file browser to
choose the color space of the file. Previously this was chosen automatically,
now it's possible to e.g. resave a Linear image as Linear ACES.
* When changing the file format, the colorspace is automatically changed to an
appropriate color space for the file format. This already happened before, but
there was no visibility or control in the operator settings for this.
* Don't change color space when using the Save operator to save over the same
file.
* Fix missing color space conversion for 16 bit PNGs, where it assumed wrongly
assumed ibuf->rect would be used for saving. Add BKE_image_format_is_byte to
more accurately test this.
Fixes T74610
Ref T68926
Differential Revision: https://developer.blender.org/D14899
Diffstat (limited to 'source/blender/compositor')
-rw-r--r-- | source/blender/compositor/operations/COM_OutputFileOperation.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.cc b/source/blender/compositor/operations/COM_OutputFileOperation.cc index 372e0736cd2..49de275c256 100644 --- a/source/blender/compositor/operations/COM_OutputFileOperation.cc +++ b/source/blender/compositor/operations/COM_OutputFileOperation.cc @@ -219,6 +219,12 @@ OutputSingleLayerOperation::OutputSingleLayerOperation(const Scene *scene, image_input_ = nullptr; BKE_image_format_init_for_write(&format_, scene, format); + if (!save_as_render) { + /* If not saving as render, stop IMB_colormanagement_imbuf_for_write using this + * colorspace for conversion. */ + format_.linear_colorspace_settings.name[0] = '\0'; + } + BLI_strncpy(path_, path, sizeof(path_)); view_name_ = view_name; |