Summary: | Pdf Interpreter hangs in 9.10. Works fine in 9.07. | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | wilfried |
Component: | Graphics Library | Assignee: | Michael Vrhel <michael.vrhel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P4 | ||
Version: | 9.10 | ||
Hardware: | PC | ||
OS: | Linux | ||
Customer: | Word Size: | --- | |
Attachments: | Pdf Document producing blocker. |
The problem only exhibits with the pngalpha device, and is transparency related, nothing to do with the PDF interpreter. A much simpler command line '-sDEVICE=pngalpha -sOutputFile=out.png' is sufficient. Michael, in gdevp14.c around line 2411 I see: if (overprint) { if (blendspot) { /* Overprint simulation of spot colorants */ for (k = 0; k < num_comp; ++i) { int temp = (255 - dst_ptr[k * planestride]) * dst[k]; temp = temp >> 8; dst_ptr[k * planestride] = (255 - temp); } Notice the loop runs from k=0 to k=num_comps, but the counter which is incremented is 'i', which is not used in this loop, hence we endlessly cycle. Naively modifying this to '++k' (which matches the other loops) and the file runs to completion, the output appears broadly correct (its a large complex page so its hard to be certain). However since its not my code I have no idea if this is correct. |
Created attachment 10425 [details] Pdf Document producing blocker. Following command: /bin/gs -dPDFDEBUG -dMaxBitmap=0 -sDEVICE=pngalpha -q -dNOPAUSE -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dUseCropBox -r300x300 -dFirstPage=1 -dLastPage=1 -sOutputFile="./tmp/Tomaten.pdf_0001.png" -c 0 0 translate -dSAFER "./tmp/Tomaten.pdf" -c showpage -c quit Stops in outputting Debug messages with: %Resolving: [266 0] /T1_6 1 Tf %Resolving: [131 0] 17.8658 2.1936 -2.1936 17.8658 1733.27161 1017.75739 Tm [ (T) 98 (ext n) 19 (ur P) 5 (l) -3 (a) 19 (tzh) 3 (a) -5 (l) 12 (t) 6 (er) ] TJ ET Thanks in advance Wilfried