Bug 228808 - Premature EOF in image causes bad JPEG stream in PDF
 Summary: Premature EOF in image causes bad JPEG stream in PDF
 Status: NOTIFIED LATER Ghostscript Unclassified PDF Writer master All All P2 normal Jack Moffitt Bug traffic Show dependency tree / graph

 Reported: 2001-01-14 22:11 PST by Alex Cherepanov 2014-02-17 04:37 PST (History) 1 user (show) jackie.rosen ---

Attachments

 Note You need to log in before you can comment on or make changes to this bug.
 Alex Cherepanov 2001-01-14 22:11:54 PST Originally reported by: alexcher@users.sourceforge.net tiff2ps utility from libtiff distribution creates PS files that often have premature EOF in the last band of data. GS initializes JPEG compressor to the full band width (=height). When EOF is encountered GS updates the height in PDF obj but JPEG stream is already written. GS should buffer the whole image and start compression only after the whole image is retrieved. This will also help to choose the encoding filter based on contents of the image as Distiller does. The file with premature EOF follows. %! 100 100 translate /DeviceGray setcolorspace << /ImageType 1 /Width 437 /Height 64 /ImageMatrix [ 1 0 0 -1 0 0 ] /BitsPerComponent 8 /Decode [0 1] /DataSource currentfile /ASCII85Decode filter /LZWDecode filter >> image J1r)3#UC/p#D>EP:q1$o*=mro@So+\<\4[Z5N$O+jE;Gl5QE%ULs0a,-]uIq;&KcL;(n;1Al C^c@PnGl9&Po$,jIHRPKKaX=B'm3'p(cH1HH5U74+JQC/mHEuP1k#hX)GLQDG^3E(3>/3%Qtk9h3cBkk^i5NnFu_A+s3@jmmW5:&sq4XFun37esj/'m.b8-$r&s5kOa(F*A2!6Msn;iGaXS(F-kAHBg&)JDi7rS 40GWss1g;rCqZO%bLHd4N,o't_@CYE$,2;Oh$ZQ/A.YBJDL9,!YT$&m_g]A55[c_/'S:;O_ Uj#^/'D-qnk,3,-4891fE3cEBHel2%g$V"%UcRK,qOC>[8YtM[S1^\P\ln$HDVKAGO=3*'42 >;B,QVbHhUO/jSWb'dh0=8h.Ep%-p8>4t>?].o$_Q&CI8t/-sn9:8;AS4:gc^&A)sLa!FGZ9 ba'eZs7*;6*An4=O5u*D=dYeJ1\,ZJ?f2du>(o9N70l2+5qB[8-WtDp/kle?t6<F%G8Co[S;-6oN96cE(Q>N1*g(o[EC"ek.-Y?PJc*_ECNMWB=Vb#Udeil c#_\M9tlG=[nY\&g36fJEScY$.sp.ic1QMBQgOoU0%f:9RI$E6kLpE !o]R27NMEbI/s3!pMN3t!l5GOYK^)aDXGpaL:+/LRdRkmll-GRZ0[r4_1QSD:=Zc>Rr7&km Mh2J\aGrim=1cO~> showpage %%EOF  Ray Johnston 2001-03-21 10:11:57 PST Comment originally by rayjj@users.sourceforge.net Logged In: YES user_id=11206 We acknowledge that this is a valid issue, but we do not have resources available to address this at this time. This problem report has been moved to doc/Issues.htm where it may remain open for some time. Relevant comments are captured there along with the ID# of this report. By moving this issue to the widely distributed Ghostscript documentation, we wish to make this issue well known and solicit help in improving Ghostscript in this area. Thanks for your input!