Summary: | kimageformats-read-psd autotest started to fail with 5.105.0 | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kimageformats | Reporter: | Heiko Becker <heiko.becker> |
Component: | general | Assignee: | Alex Merry <alex.merry> |
Status: | REOPENED --- | ||
Severity: | normal | CC: | aacid, kdelibs-bugs, kloczko.tomasz, mircomir |
Priority: | NOR | ||
Version: | 5.105.0 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/frameworks/kimageformats/commit/9b1fafe29bbf1242406d59f39206e62e2bbb6985 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: |
Birthday image generated on my desktop
Birthday image generated on CI's VM |
Description
Heiko Becker
2023-04-08 13:44:47 UTC
*** Bug 468292 has been marked as a duplicate of this bug. *** Mirco, I can also reproduce this locally (CI seems happy though). What can we do to help debug this? (In reply to Albert Astals Cid from comment #2) > Mirco, I can also reproduce this locally (CI seems happy though). > > What can we do to help debug this? It's the problem I had about a month ago after my last patch to the psd plugin. For me it worked locally (debian unstable) but failed on invent (all vms). That image is the only one with premultiplied alpha and alpha values other than 255. In my case it changed a few pixels and it seemed due to rounding differences in the conversion from RBG8888_Premul to ARGB32. I then assumed that my distro (install dated 2006) was the problem and so I used invent's comparison png. To help with debugging I must definitely reintroduce Base64 printing of the image on failure. I do this in the afternoon and then try to figure out what's going on. Created attachment 157974 [details]
Birthday image generated on my desktop
Created attachment 157975 [details]
Birthday image generated on CI's VM
Even on my Debian, the image generated by birthday.ppd is slightly different from the one generated on all CI machines. The difference is on 15 pixels with values like RGB(55,47,54) vs RGB(55,48,54). I have no idea how to figure out what is causing this difference. PS: In the meantime I also fixed a problem I found but it doesn't change the result. OK, I played dirty. I modified the test to accept tif images as well as pngs. The tiffs can be saved in premultiplied format, so the test must convert both the image to be tested and the comparison images. Now it works both on my local machine and on invent. I don't like the solution I proposed and it's marked as a draft. In any case, can you try it? https://invent.kde.org/frameworks/kimageformats/-/merge_requests/148 (In reply to Mirco Miranda from comment #7) [..] > In any case, can you try it? > > https://invent.kde.org/frameworks/kimageformats/-/merge_requests/148 Of course :) One sec .. (In reply to Mirco Miranda from comment #7) [..] > https://invent.kde.org/frameworks/kimageformats/-/merge_requests/148 Tested and it works with that MR :) Thank you. (In reply to Mirco Miranda from comment #7) > I don't like the solution I proposed and it's marked as a draft. In any > case, can you try it? > https://invent.kde.org/frameworks/kimageformats/-/merge_requests/148 Passed here as well, after installing the libqtiff plugin. (In reply to Mirco Miranda from comment #6) > I have no idea how to figure out what is causing this difference. I are we using some pow/sqrt/sin or similar in that code? Git commit 9b1fafe29bbf1242406d59f39206e62e2bbb6985 by Albert Astals Cid, on behalf of Mirco Miranda. Committed on 12/04/2023 at 20:34. Pushed by aacid into branch 'kf5'. Fix wrong alpha conversion and use tif for image comparison in this particular one instead of png D +- -- autotests/read/psd/birthday.png A +- -- autotests/read/psd/birthday.tif M +8 -3 autotests/readtest.cpp M +1 -2 src/imageformats/psd.cpp https://invent.kde.org/frameworks/kimageformats/commit/9b1fafe29bbf1242406d59f39206e62e2bbb6985 I'm going to reopen this ticked because if source tree is configured with BUILD_TESTING=ON it should be added checking dependency for Qt5::QTiffPlugin. Withou that cmake is able configure source tree and there is no any obstacles to start test suite which is failig with ERROR: birthday.pdd: could not load birthday.tif: Unsupported image format (In reply to kloczek from comment #13) > I'm going to reopen this ticked because if source tree is configured with > BUILD_TESTING=ON it should be added checking dependency for Qt5::QTiffPlugin. This should be fixed in KF6. Instead of including the plugin, the test is skipped if the comparison image format is not present (notifying you). The change has not been ported to KF5. |