diff options
author | Sascha Silbe <sascha-pgp@silbe.org> | 2011-10-11 22:43:40 (GMT) |
---|---|---|
committer | Sascha Silbe <sascha-pgp@silbe.org> | 2011-10-11 22:43:40 (GMT) |
commit | a125f5cd1e930408eb19bd4562c9c0d6fb29d570 (patch) | |
tree | fa60ad7013ff1b081cd68ef2b4df05d98c573866 | |
parent | deb187b9d665771683964c76e2f0932d79cc16d3 (diff) |
Fix PDF page sizes
We need to use actual image sizes, not the thumbnail sizes.
-rw-r--r-- | scan.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -411,12 +411,13 @@ class ScanThread(threading.Thread): suffix='.png') image.save(image_file.name) image_file.flush() + size = image.size image.thumbnail((1024, 1024)) preview = self._pil_image_to_pixbuf(image) info = { 'file': image_file, - 'width_pixel': image.size[0], - 'height_pixel': image.size[1], + 'width_pixel': size[0], + 'height_pixel': size[1], 'dpi': self._dpi, 'preview': preview, } |