The attached PDF file is converted with images damaged with gs8.63 and head (r9374) but works with gs8.54. Regression testing shows the first revision that failed is r8810: ------------------------------------------------------------------------ r8810 | alexcher | 2008-06-29 17:05:40 -0700 (Sun, 29 Jun 2008) | 8 lines Add one more way to store data of the reusable stream: an array of strings. Read the input stream into an array of strings during reusable stream construction and use the array directly as a data storage. Bug 689476, customer 190. DIFFERENCES: None ------------------------------------------------------------------------ The command line I'm using for testing: bin/gs -sDEVICE=tiff24nc -o test.tif ./25555.pdf
Created attachment 4734 [details] 25555.pdf
Created attachment 4738 [details] oo3i.pdf -- simolified sample file This bug is not entirely a regression. The new implementation of the reusable stream introduced relatively small stream buffer (1K), while previous implementation kept the whole stream in a single block and used it as a stream buffer. Apparently, ICC profile reader cannot get the data correctly when the buffer is small. The attached decompressed file doesn't render the image on any version of Ghostscript. An decompression step appears to add missing steam access logic to ICC reader.
This is not an ICC bug. ICCBased color space can be changed into /DeviceRGB without any visible affects. I didn't realize that masked image also uses reusable streams but goes through a different branch.
Created attachment 4758 [details] patch Keep reading the data sources until all of them reach EOF instead of bailing out when the first one reaches EOF. Different data sources can have different compression techniques and buffer sizes. The mask in masked images also has different length from other streams. The patch makes PDF file generated from Bug689359.pdf render differently. There are also some strange effects on 541_623.pdf .
The differences in pdf file generated from Bug689359.pdf are progressions. A wavy black line at the bottom of the image is now visible. The differences in 541_623.pdf were, probably, caused by a hardware glitch. I cannot reproduce them now.
The patch is committed as a rev. 9444. s/Bug689359.pdf/Bug689369.pdf/g