From cd5960d2d7618946902daf67712929853c311140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=99=8E?= Date: Tue, 26 Jul 2022 21:16:11 +0800 Subject: [PATCH] fix a potention bug of unexpected type 'float' --- src/calibre/ebooks/oeb/transforms/rasterize.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/oeb/transforms/rasterize.py b/src/calibre/ebooks/oeb/transforms/rasterize.py index 7746430a0a..95396703da 100644 --- a/src/calibre/ebooks/oeb/transforms/rasterize.py +++ b/src/calibre/ebooks/oeb/transforms/rasterize.py @@ -34,8 +34,8 @@ def rasterize_svg(data=TEST_SVG, sizes=(), width=0, height=0, print=None, fmt='P svg = QSvgRenderer(QByteArray(data)) size = svg.defaultSize() if size.width() == 100 and size.height() == 100 and sizes: - size.setWidth(sizes[0]) - size.setHeight(sizes[1]) + size.setWidth(int(sizes[0])) + size.setHeight(int(sizes[1])) if width or height: size.scale(int(width), int(height), Qt.AspectRatioMode.KeepAspectRatio) if print is not None: