[cl-typesetting-devel] PDF::READ-JPEG-FILE and certain JPGs

Andrew Philpot philpot at ISI.EDU
Fri Jun 10 00:48:37 UTC 2005


It seems that not all JPEGs are created equal, at least as regards
PDF::READ-JPEG-FILE.

  QUICKHELP2(48): (pdf::read-jpeg-file "kidfriendly-200-50.jpg")
  Error: eof encountered on stream
	 #<EXCL::BINARY-INPUT-FILE-STREAM #P"kidfriendly-200-50.jpg" pos 69161 @ 
#x725992aa>
    [condition type: END-OF-FILE]

  Restart actions (select using :continue):
   0: Return to Top Level (an "abort" restart).
   1: Abort entirely from this (lisp) process.
  [1] QUICKHELP2(49): :reset
  QUICKHELP2(50): (pdf::read-jpeg-file "kidfriendly-200-50b.jpg")
  #<PDF::JPEG-IMAGE @ #x7259d732>

I created the second above by rewriting the first using 'xv', no doubt
lossily, which apparently demotes the version:

  blombos.isi.edu 1237% file kidfriendly-200-50*.jpg
  kidfriendly-200-50b.jpg: JPEG image data, JFIF standard 1.01, aspect ratio, 
"CREATOR: XV Version 3.10a  Rev:", 1 x 1
  kidfriendly-200-50.jpg:  JPEG image data, JFIF standard 1.02, resolution 
(DPI), 72 x 72

But what gives?  I often get the jpgs from either digital cameras or
photoshopping collaborators.  Should I tell them to convert to JFIF
1.01 (is that even meaningful) or is this something that CL-PDF
should/might be upgraded to understand?

Thanks,
Andrew

ps: images are available at http://www.isi.edu/~philpot/cl-pdf/ for the 
curious.




More information about the cl-typesetting-devel mailing list