Proper change of color space and profile for image through "Image properties" dialog.
ClosedPublic

Authored by dimitard on Jan 29 2017, 1:25 AM.

Details

Summary

The issue this patch solves is described in bug Bug 322444 - There should be a way to assign a new ICC profile to an image. The need here is to be able to change/assign color profile/space attributes to a given image, especially when no embedded ICC profile is available for an image. The patch implements proper undo-redo logic.

Test Plan
  • Test ability to switch color spaces without performing actual change in the pixel values when changing only the color profile, but remaining with the same color model and depth.
  • Test the above with files having different color model and depth.
  • Test behavior when changing color model and depth.
NOTE: Limited test of the patch was done with 16bit/channel RGB file with selected mode "RGB/Alpha" and switching to "CMYK/Alpha". Seem to work fine with exception of the case when the "Channels" docker is shown - it seems to crash while trying undo-redo because of refresh issues.

Diff Detail

Repository
R37 Krita
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
dimitard updated this revision to Diff 10666.Jan 29 2017, 1:25 AM
dimitard retitled this revision from to Proper change of color space and profile for image through "Image properties" dialog..
dimitard updated this object.
dimitard edited the test plan for this revision. (Show Details)
dimitard added a reviewer: rempt.
dimitard set the repository for this revision to R37 Krita.
dimitard added a subscriber: Krita.
rempt accepted this revision.Jan 30 2017, 9:16 AM
rempt edited edge metadata.

Looks good, so ship it, but could you check what is going on in the channels docker as well? It should be easy enough to fix a crash in that code...

This revision is now accepted and ready to land.Jan 30 2017, 9:16 AM
This revision was automatically updated to reflect the committed changes.

Due to this commit, the conversion from 16bit integer (g10) profile to 8 bit integer trc profile results in darker image. I believe this is a regression.
here is the bug report -> https://bugs.kde.org/show_bug.cgi?id=377267