This is a strange one. In calibre, icons are rendered using the following code:
img = QImage(path).scaled(int(width), int(height), Qt.AspectRatioMode.IgnoreAspectRatio, Qt.TransformationMode.SmoothTransformation) img.save(dest)
https://github.com/kovidgoyal/calibre/blob/3855552c193dceb8a75dbe1a29fbc40f004133c3/src/calibre/linux.py#L1315 https://doc.qt.io/qt-6/qimage.html#scaled-1
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 modified-..5........ /usr/share/icons/hicolor/32x32/mimetypes/application-x-kindle-application.png modified-..5........ /usr/share/icons/hicolor/32x32/mimetypes/application-x-mobi8-ebook.png modified-..5........ /usr/share/icons/hicolor/32x32/mimetypes/application-x-mobipocket-ebook.png modified-S.5........ /usr/share/icons/hicolor/32x32/mimetypes/application-x-topaz-ebook.png modified-S.5........ /usr/share/icons/hicolor/48x48/apps/calibre-ebook-edit.png modified-S.5........ /usr/share/icons/hicolor/48x48/apps/calibre-gui.png modified-..5........ /usr/share/icons/hicolor/48x48/apps/calibre-viewer.png modified-S.5........ /usr/share/icons/hicolor/48x48/mimetypes/application-lrf.png modified-S.5........ /usr/share/icons/hicolor/48x48/mimetypes/application-x-kindle-application.png modified-S.5........ /usr/share/icons/hicolor/48x48/mimetypes/application-x-mobi8-ebook.png modified-S.5........ /usr/share/icons/hicolor/48x48/mimetypes/application-x-mobipocket-ebook.png modified-..5........ /usr/share/icons/hicolor/48x48/mimetypes/application-x-topaz-ebook.png modified-S.5........ /usr/share/icons/hicolor/48x48/mimetypes/text-lrs.png modified-S.5........ /usr/share/icons/hicolor/64x64/apps/calibre-ebook-edit.png modified-..5........ /usr/share/icons/hicolor/64x64/apps/calibre-gui.png
There are some tiny differences in shading of some pixels. The difference is not discernible visually for me.
Can we report this against qt somewhere? Unfortunately the calibre code has layers and layers and when I try to execute the code standalone the qt import fail.
One byte size difference, slightly different content:
<img alt="calibre-gui.png" src="/fedora-reproducible-builds/project/issue/raw/files/70a7a298b0b7ee07255d8e958b122d81208aef74213c3a9e09d17531918b1bae-calibre-gui.png" />
<img alt="calibre-gui.png" src="/fedora-reproducible-builds/project/issue/raw/files/c427e2c4ca6e6c01eeb7373f32a391062c8ed63eea25d56eb69cc5e327a54875-calibre-gui.png" />
Metadata Update from @zbyszek: - Issue tagged with: irreproducibility
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.
Log in to comment on this ticket.