Fix for 687494, rangecheck error while processing image
Alex Cherepanov <[email protected]> Wed, 02 Jun 2004 16:24:10 -0400
| Newsgroups | gmane.comp.printing.ghostscript.patches |
|---|---|
| Organization | Coscript Software |
| Message-ID | <[email protected]> |
Round elements of Mask array to the nearest integer following AR6 implementation. Fix bug 687494 from customer 580. Sorry, my previous message about this bug had a wrong attachment. Please ignore it. _______________________________________________ gs-code-review mailing list [email protected] http://www.ghostscript.com/mailman/listinfo/gs-code-review
pdf_draw.ps.diff
(text/plain, 788 B)
Index: gs/lib/pdf_draw.ps
===================================================================
RCS file: /cvs/ghostscript/gs/lib/pdf_draw.ps,v
retrieving revision 1.81
diff -b -u -r1.81 pdf_draw.ps
--- gs/lib/pdf_draw.ps 24 May 2004 17:56:39 -0000 1.81
+++ gs/lib/pdf_draw.ps 2 Jun 2004 20:11:07 -0000
@@ -872,6 +872,14 @@
% imagedict
dup type /arraytype eq {
/ImageType 4 def
+ % Check that every element of the Mask is an integer.
+ //false 1 index {
+ type /integertype ne or
+ } forall {
+ (\n **** Warning: Some elements of Mask array are not integers.\n)
+ pdfformaterror
+ [ exch { 0.5 add cvi } forall ] % following AR6 implementation
+ } if
/MaskColor exch def
} {
% Mask is a stream, another Image XObject.