Created attachment 131771 [details] broken image file When saving a png (created by imagemagick/`import`), the colors get broken. None of the options for changing how Gwenview handles colors in Settings -> Advanced fixes it, but putting in a return in RasterImageViewPrivate::updateDisplayTransform() before anything is done fixes it. I've attached both the original png and the broken one from Gwenview. Happens with git master, and also before the last changes to color stuff I could find (b76047f541340df561c2d7b91b825814923843b5).
Created attachment 131772 [details] original file
Seems like there's some funky business with gwenview's own color space handling + QColorSpace. Resetting the colorspace before (`image.setColorSpace(QColorSpace())`) saving in DocumentLoadedImpl::saveInternal() unbreaks it.
Yikes. Feel free to send a merge request!
Just not sure if always clearing the color space is the right way to go... Testing with e. g. chrome also shows the gamma completely wrong, so it might be an issue in imagemagick (recent regression, I haven't seen it before). But maybe we could add a new checkbox with "ignore color profiles" together with the "Apply color profile embedded in the image file" setting?
In general I think it's better to fix the issue rather than adding an option to work around it, but I admit to knowing next to nothing about color profiles, so I don't know if such an option would be broadly useful outside the scope of allowing the user to work around this bug. Regardless, I think we should try to fix the bug itself, is possible.
A possibly relevant merge request was started @ https://invent.kde.org/graphics/gwenview/-/merge_requests/20
Created attachment 146989 [details] Example: Wallpaper of Plasma 5.3 (original file) I'm not completely sure but I'm seeing a bug that might by the same as this one. There is a rare number of images that have weird/broken colors (desaturated/"much too bright") when viewing them with Gwenview. One example is the wallpaper of Plasma 5.3 which I'm attaching here. Some testing revealed that: * it's the same both on Wayland and X11 * Colors get displayed correctly in Gimp, Dolphin preview and when I set the image as my wallpaper * If I save an affected image in Gwenview, the colors look broken also in all other apps. * If I save the image in Gimp, the copy gets displayed correctly even in Gwenview (I'm attaching this one too.) * I couldn't spot any suspicious difference in the metadata of affected/unaffected images. Kind regards, Jan
Created attachment 146990 [details] Example: Wallpaper of Plasma 5.3 (saved by Gimp)
Created attachment 146991 [details] Screenshot of Plasma 5.3. wallpaper opened in Gwenview