GNOME Bugzilla – Bug 569661
Import from PDF throws errors when entering resolution in pixels per millimetre
Last modified: 2009-07-08 19:26:42 UTC
Please describe the problem: When importing a PDF document in Gimp, a dialog titles "Import from PDF" appears. The dialog provides a field "Resolution", with a choice control for the units. Changing to units "pixels per millimetre" correctly adjusts the numerical value in the preceding resolution field. The document is imported correctly. When changing the unit AND the numerical value in the resolution field (example: to 10 pixels per millimetre) Gimp throws error messages when the "Import" button is pressed. Observed in Gimp 2.6.3 and 2.6.4 on openSuSE 11.0 (x86_64) Steps to reproduce: 1. Drop PDF document on tools window -> "Import from PDF" dialogue appears 2. Change units of resolution to "pixels per millimetre" 3. Change value of resolution to any reasonable value (eg: 10) 4. Press "Import" button Actual results: Error messages appear: Calling error for procedure 'gimp-image-new': Procedure 'gimp-image-new' has been called with value '0' for argument 'width' (#1, type GimpInt32). This value is out of range. Calling error for procedure 'gimp-image-undo-disable': Procedure 'gimp-image-undo-disable' has been called with an invalid ID for argument 'image'. Most likely a plug-in is trying to work on an image that doesn't exist any longer. Calling error for procedure 'gimp-image-set-filename': Procedure 'gimp-image-set-filename' has been called with an invalid ID for argument 'image'. Most likely a plug-in is trying to work on an image that doesn't exist any longer. Too many error messages! Messages are redirected to stderr. Expected results: Selected pages of PDF document are imported with given resolution Does this happen every time? Yes, tried with several PDF-documents and 2 versions of gimp Other information:
Same problem observed with gimp 2.4.5 on Windows XP
Created attachment 137726 [details] [review] A patch for what seems to be a simple typo This one is a typo in file 'plug-ins/common/file-pdf.c' attached is a patch against the sources of the release 2.6.6. Massimo
Thanks Massimo. I notice that the bug is still labelled "Unconfirmed". Does that mean that this bug still needs to be assigned to someone to review this patch? Or will it be included in 2.6.7 or 2.8.0 automatically now? Stephan
Massimo, what is your full name and what email address would you like to use for the commit? It shall be in the format "Martin Nordholts <martinn@src.gnome.org>"
Unconfirmed means that it has not yet been reproduced and confirmed by a GIMP developer. Since we have a patch now, I will assume that Massimo has been able to reproduce it. Setting the state and milestone accordingly.
Patch applied to master and merged to the gimp-2-6 branch. Closing as FIXED. Massimo, thanks a lot for your help with this bug. commit a7bca9407d7dec994cbb116e32e84589d34840a5 Author: Massimo Valentini <sixtysix@inwind.it> Date: Tue Jul 7 17:09:21 2009 +0200 Bug 569661 – Import from PDF throws errors when entering resolution in pixel Fix calculation of dpi value. plug-ins/common/file-pdf.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)