Summary: | Krita cannot save if file contains reference images | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Storm Engineer <storm.anthro> |
Component: | Tools/Reference Images | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | halla |
Priority: | NOR | ||
Version: | git master (please specify the git hash!) | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/kde/krita/commit/6a1e32f1c9a115fc03456b592ab31d6e5f2768e6 | Version Fixed In: | |
Sentry Crash Report: |
Description
Storm Engineer
2020-01-21 00:35:55 UTC
This works here, both with my self-built krita and with the nightly appimage build. * Which version of libpng do you have? I am still on 1.6; it seems that 1.7 might be more strict than 1.6. * If might also be a problem with Qt 5.14... I am still on 5.12, because already 5.13 caused a host of regressions. PNG reference images are saved using Qt's PNG export code, not Krita's PNG export code. libpng 1.6.37 I'm going to downgrade qt and see if that fixes it. I'm on 1.6.34 to be exact. You're using Arch, right? Yes, Arch. Sadly I could not test downgrading qt, because a partial downgrade caused Plasma to be unable to start. But Arch actually moved on from qt 5.12 last June, and from libpng 1.6.34 in 2017. Version histories: https://git.archlinux.org/svntogit/packages.git/log/trunk?h=packages/qt5-base https://git.archlinux.org/svntogit/packages.git/log/trunk?h=packages/libpng I wonder what more we could test -- maybe loading and saving the png image you use for your reference image in kolourpaint or gwenview? The PNG loads and saves fine in Gwenview. I can also save it just fine with Krita when opened as an image, saving only fails when it's inserted as a reference image. P.s.: I see you changed the platform. I'm confused about that property. What does it actually refer to? The Krita build's origin (shipped by repo vs compiled)? Loading and saving PNG's in Krita doesn't use the Qt image loading saving code; saving reference images does. The platform consists of the source of the build -- built from sources, Arch packages, that sort of thing -- and the OS (Linux). Thanks for your comment! Automatically switching the status of this bug to REPORTED so that the KDE team knows that the bug is ready to get confirmed. In the future you may also do this yourself when providing needed information. I tried to setup an arch vm yesterday, but that's way too much work just to test with Qt 5.14... Oh, and I should have asked: does this happen with any image, or with a particular image or set of images that you are using? What I think that happens is that starting with Qt 5.14, QImage keeps the icc profile from the original image around, using the new QColorSpace class. When we're trying to save to PNG, libpng protests because Qt also saves PNG with the sRGB flag, which conflicts with the presence of the ICC profile. Okay, that's probably not it. I guess I need the kra file without the reference image and the reference image you're working with to try to see what happens. Git commit a6d484ca55513ba88cc15f44cf831905da2e224a by Boudewijn Rempt. Committed on 22/01/2020 at 14:52. Pushed by rempt into branch 'master'. Workaround Qt 5.14's colormanagement preventing png files from being saved M +11 -1 libs/ui/KisReferenceImage.cpp https://invent.kde.org/kde/krita/commit/a6d484ca55513ba88cc15f44cf831905da2e224a I've managed to create a minimal project showing the bug in Qt: https://bugreports.qt.io/browse/QTBUG-81604 Sorry for the late reply. Do you still need my assistance with this? Nope -- there's a workaround in Krita, and the fix to Qt actually was accepted today. Git commit 6a1e32f1c9a115fc03456b592ab31d6e5f2768e6 by Boudewijn Rempt. Committed on 28/01/2020 at 09:16. Pushed by rempt into branch 'krita/4.2'. Workaround Qt 5.14's colormanagement preventing png files from being saved M +13 -1 libs/ui/KisReferenceImage.cpp https://invent.kde.org/kde/krita/commit/6a1e32f1c9a115fc03456b592ab31d6e5f2768e6 |