From andrew.philpot at gmail.com Mon Sep 10 16:50:00 2012 From: andrew.philpot at gmail.com (Andrew Philpot) Date: Mon, 10 Sep 2012 09:50:00 -0700 Subject: [cl-pdf-devel] pdf::read-jpeg-file Message-ID: Running cl-pdf 2.1 (although the source tag says pdf::*version* = 2.03) I have a legacy cl-pdf application which embeds JPG files into the pdf documents. I've noticed that more and more JPGs that I encounter are not accessible via PDF::READ-JPEG-FILE, that is, the underlying PDF::%READ-JPEG-FILE% signals an EOF due to not recognizing some marker byte. I'm guessing this is due to new camera capabilities or new metadata from various image processing software; and I suppose that PDF::%READ-JPEG-FILE% didn't anticipate some legal segment(s) in the file. My current workaround is to run exiftool -all= to drop all EXIF metadata. But I was wondering whether anyone has a patch to the JPG reader, or has the expertise to look at this and the JPG specs and ascertain what is going on. A sample non-readable image is available at http://www.isi.edu/~philpot/qh2012/original.jpg Thanks! -- Andrew Philpot andrew.philpot at gmail.com From pat at nklein.com Tue Sep 11 01:36:15 2012 From: pat at nklein.com (Patrick Stein) Date: Mon, 10 Sep 2012 20:36:15 -0500 Subject: [cl-pdf-devel] pdf::read-jpeg-file In-Reply-To: References: Message-ID: Are you trying this on Windows? I had no problem reading this file with cl-pdf from the current quicklisp distribution under MacOSX. I see some places it could signal 'image-file-parse-error, but not EOF. ? Patrick On Sep 10, 2012, at 11:50 AM, Andrew Philpot wrote: > Running cl-pdf 2.1 (although the source tag says pdf::*version* = 2.03) > > I have a legacy cl-pdf application which embeds JPG files into the pdf > documents. I've noticed that more and more JPGs that I encounter are > not accessible via PDF::READ-JPEG-FILE, that is, the underlying > PDF::%READ-JPEG-FILE% signals an EOF due to not recognizing some > marker byte. I'm guessing this is due to new camera capabilities or > new metadata from various image processing software; and I suppose > that PDF::%READ-JPEG-FILE% didn't anticipate some legal segment(s) in > the file. > > My current workaround is to run exiftool -all= to drop all EXIF > metadata. But I was wondering whether anyone has a patch to the JPG > reader, or has the expertise to look at this and the JPG specs and > ascertain what is going on. > > A sample non-readable image is available at > http://www.isi.edu/~philpot/qh2012/original.jpg > > Thanks! > > -- > Andrew Philpot > andrew.philpot at gmail.com > > _______________________________________________ > cl-pdf-devel site list > cl-pdf-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cl-pdf-devel From andrew.philpot at gmail.com Tue Sep 11 19:16:03 2012 From: andrew.philpot at gmail.com (Andrew Philpot) Date: Tue, 11 Sep 2012 12:16:03 -0700 Subject: [cl-pdf-devel] pdf::read-jpeg-file In-Reply-To: References: Message-ID: Thanks, Patrick, for the heads-up to check out the version from Quicklisp which does solve this problem, even though it is also indicated to be version 2.03. Andrew On Mon, Sep 10, 2012 at 6:36 PM, Patrick Stein wrote: > > Are you trying this on Windows? I had no problem reading this file with cl-pdf from the current quicklisp distribution under MacOSX. I see some places it could signal 'image-file-parse-error, but not EOF. > > ? Patrick > > On Sep 10, 2012, at 11:50 AM, Andrew Philpot wrote: > >> Running cl-pdf 2.1 (although the source tag says pdf::*version* = 2.03) >> >> I have a legacy cl-pdf application which embeds JPG files into the pdf >> documents. I've noticed that more and more JPGs that I encounter are >> not accessible via PDF::READ-JPEG-FILE, that is, the underlying >> PDF::%READ-JPEG-FILE% signals an EOF due to not recognizing some >> marker byte. I'm guessing this is due to new camera capabilities or >> new metadata from various image processing software; and I suppose >> that PDF::%READ-JPEG-FILE% didn't anticipate some legal segment(s) in >> the file. >> >> My current workaround is to run exiftool -all= to drop all EXIF >> metadata. But I was wondering whether anyone has a patch to the JPG >> reader, or has the expertise to look at this and the JPG specs and >> ascertain what is going on. >> >> A sample non-readable image is available at >> http://www.isi.edu/~philpot/qh2012/original.jpg >> >> Thanks! >> >> -- >> Andrew Philpot >> andrew.philpot at gmail.com >> >> _______________________________________________ >> cl-pdf-devel site list >> cl-pdf-devel at common-lisp.net >> http://common-lisp.net/mailman/listinfo/cl-pdf-devel > -- Andrew Philpot andrew.philpot at gmail.com