Bug 691003 - Customer supplied patch for gxiscale.c
Summary: Customer supplied patch for gxiscale.c
Status: NOTIFIED WORKSFORME
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Graphics Library (show other bugs)
Version: master
Hardware: Macintosh MacOS X
: P4 enhancement
Assignee: Marcos H. Woehrmann
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-15 09:35 UTC by Marcos H. Woehrmann
Modified: 2011-10-02 04:18 UTC (History)
2 users (show)

See Also:
Customer: 1110
Word Size: ---


Attachments
patch (2.52 KB, patch)
2009-12-15 09:35 UTC, Marcos H. Woehrmann
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marcos H. Woehrmann 2009-12-15 09:35:10 UTC
The customer reports:

Below is a "diff" of a fix that prevents an infinite loop (which i saw trying to render with Interpolation a PDF
that had a 2x1-pixel image).  There's also another fix found by observation.  I haven't seen any 
consequence from the second bug yet.  You're welcome.
Comment 1 Marcos H. Woehrmann 2009-12-15 09:35:50 UTC
Created attachment 5776 [details]
patch
Comment 2 Michael Vrhel 2010-01-07 11:41:07 UTC
Thank you for the patch.  Could you supply the file with the 2x1 image?  

I agree that we should not do the interpolation process if iss.WidthOut ==
iss.WidthIn && iss.HeightOut == iss.HeightIn .  I don't agree though with
iss.WidthIn < 2 || iss.HeightIn < 2.  
If I have an Nx1 or 1xN ( column or row ) image, then interpolation will be
different than pixel replication/removal.  We could have this be (iss.WidthIn <
2 && iss.HeightIn < 2), but then your 2x1 image would have its issue.  I would
like to understand why that occurs rather than mask it.

The other issue was fixed in rev 9873.
Comment 3 Marcos H. Woehrmann 2010-02-04 10:21:13 UTC
Created attachment 5942 [details]
smallimage.ps
Comment 4 Michael Vrhel 2010-02-16 11:13:09 UTC
Assigning to Dave to investigate infinite loop issue with small image.
Comment 5 Dave Eberly 2010-02-18 13:39:21 UTC
Unable to reproduce on Intel PC, Intel Mac, or PowerPC Mac with HEAD, either 
with smallimage.ps (contains a 3x8 image) or with a self-made PDF with a 2x1 
image.  Testing included setting a breakpoint at the code related to the patch 
and verifying the breakpoint was reached.
Comment 6 Marcos H. Woehrmann 2011-07-11 14:41:41 UTC
I'm not able to reproduce this with the current head (and without the supplied patch).  I'm closing the bug but will reopen if I can find a command line that fails.