Resize image can choose zero size for small values

Bug #935234 reported by Alan Pettigrew
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

Latest Calibre on 18/02/12
calibre, version 0.8.40
Xubuntu with latest updates.
/usr/local/calibre$ uname -a
Linux bumble 3.0.0-16-generic #28-Ubuntu SMP Fri Jan 27 17:44:39 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Input file is huge, so not attached. No output file, but I think the problem is obvious.

Converting PDF to EPUB fails.
Looks like there is no lower limit on shrinking images.
They do look like stranges sizes, but I didn't set them up.

From the log:
...
Rescaling image from 8x832 to 7x751 index-13_28.jpg
Rescaling image from 1296x2 to 566x0 index-83_44.jpg
Failed to rescale image
Traceback (most recent call last):
  File "site-packages/calibre/ebooks/oeb/transforms/rescale.py", line 54, in rescale
  File "site-packages/calibre/utils/magick/__init__.py", line 181, in fset
Exception: negative or zero image size `' @ error/resize.c/ResizeImage/2556

Rescaling image from 5005x4934 to 566x558 index-299_1.jpg
...

Related branches

Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in lp:calibre

Fixed in branch lp:calibre. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.