Page MenuHome

Color Management: various improvements and fixes for image saving
ClosedPublic

Authored by Brecht Van Lommel (brecht) on May 9 2022, 8:50 PM.

Details

Summary
  • 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.

Diff Detail

Repository
rB Blender

Event Timeline

Brecht Van Lommel (brecht) requested review of this revision.May 9 2022, 8:50 PM
Brecht Van Lommel (brecht) created this revision.
Sergey Sharybin (sergey) requested changes to this revision.May 10 2022, 10:05 AM

Thanks for the quick patch.

Unfortunately, there is still something confusing. If you download both files, hit alt-s in the image editor everything seems to be allright (there is no change in the currently visible image, and no changes to the color space settings, which is great!). However, if you reload the image (alt-r I believe) the image will change its color. Reloading .blend file after saving image leads to the same result, but it could be harder to see.

This revision now requires changes to proceed.May 10 2022, 10:05 AM

Update with a bigger revamp of image saving and color spaces.

Brecht Van Lommel (brecht) retitled this revision from Fix T74610: saving image unnecessarily resets color space to Color Management: various improvements and fixes for image saving.May 12 2022, 11:21 PM
Brecht Van Lommel (brecht) edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.May 13 2022, 3:59 PM