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

Marc Battyani marc.battyani at fractalconcept.com
Mon Jun 13 14:31:17 UTC 2005


 "Andrew Philpot" <philpot at ISI.EDU> wrote:
>
> 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?

cl-pdf tries to get the width and height from the jpeg file. Maybe this
should be changed to be compatible with new format version.

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

OK got them. I will have a look at them ASAP.

Marc





More information about the cl-typesetting-devel mailing list