From d8227f7f1a486ad08917b2c6d003bb0dcb0205f6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 13 May 2016 11:21:14 +0530 Subject: [PATCH] Fix overlay_image() failing if floats are passed as left/top --- src/calibre/utils/img.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/calibre/utils/img.py b/src/calibre/utils/img.py index b3cdfcb8ee..6d22a46679 100644 --- a/src/calibre/utils/img.py +++ b/src/calibre/utils/img.py @@ -74,6 +74,7 @@ def overlay_image(img, canvas=None, left=0, top=0): if canvas is None: canvas = QImage(img.size(), QImage.Format_RGB32) canvas.fill(Qt.white) + left, top = int(left), int(top) if imageops is None: # This is for people running from source who have not updated the # binary and so do not have the imageops module