From: YOKOTA Hiroshi Date: Wed, 13 May 2026 10:57:41 +0900 Subject: Use PIL to provide reproducible icon image Forwarded: not-needed PyQt (QImage class) dose not provide reproducible image data between different machines. Use PIL for reproducible build. --- src/calibre/linux.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/linux.py b/src/calibre/linux.py index 9f4cb07..125233b 100644 --- a/src/calibre/linux.py +++ b/src/calibre/linux.py @@ -1422,10 +1422,10 @@ def write_appdata(key, entry, base, translators): def render_img(image, dest, width=128, height=128): - from qt.core import QImage, Qt + from PIL import Image - img = QImage(I(image)).scaled(int(width), int(height), Qt.AspectRatioMode.IgnoreAspectRatio, Qt.TransformationMode.SmoothTransformation) - img.save(dest) + img = Image.open(fp=I(image)).resize(size=(int(width), int(height))) + img.save(fp=dest) def main():