Re: strange reproducibility problem with QImage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Zbigniew Jędrzejewski-Szmek wrote:
> With python3-pyqt6-6.8.0-0.1.fc42.x86_64, we get a difference in how the
> icons are rendered:
> 
>     calibre-7.20.0-1.fc42.x86_64
>         modified-S.5........
>         /usr/share/icons/hicolor/16x16/apps/calibre-gui.png
>         modified-S.5........
>         /usr/share/icons/hicolor/32x32/apps/calibre-ebook-edit.png
>         modified-S.5........
>         /usr/share/icons/hicolor/32x32/apps/calibre-gui.png
>         modified-S.5........
>         /usr/share/icons/hicolor/32x32/apps/calibre-viewer.png ...
> 
> There are some tiny differences in shading of some pixels. The difference
> is not discernible visually for me. [1] has example icons attached.
> 
> Is this a bug in Qt and implementation of QImage.scaled [3] ?

As I understand the Qt source code, QImage.scaled with the 
Qt.TransformationMode.SmoothTransformation flag ends up calling 
QImage.smoothScaled (QImage.scaled calls the general QImage.transformed, 
which then detects the special case and calls QImage.smoothScaled), which in 
turn calls the private qSmoothScaleImage. And that one uses a different 
algorithm based on whether the CPU is runtime-detected to support SSE 4.1 or 
not. (For non-x86, there are also optimized implementations for ARM NEON and 
Longsoon LSX, also with runtime detection, otherwise the generic C 
implementation is used, as on pre-SSE-4.1 x86.) See 
https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/painting/qimagescale.cpp 
and 
https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/painting/qimagescale_sse4.cpp 
. It is likely that the vectorized implementation rounds slightly 
differently. So you then end up with different results when building on non-
identical builder hardware.

        Kevin Kofler

-- 
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux