Well, as you have to admit now, this is no IM error, so this is rather not the right forum to discuss this issue...
I think you have to nail down what's wrong with these images. I have seen things like these before, i.e. that corrupt images are read by one program and produce incorrect output in another program. It could be that some redundant header information is used by one program and ignored by another one. Possibly there is a way of getting rid of superfluoes data by just truncating the file at the right position, using standard software. (I have done so with PDF files before.) You probably have to analyse the PBM files by use of a hexeditor. The PBM format seems to be rather simple and is described on several websites. Furthermore, there seem to be ready-made analysation tools for it. You could also have a look at IM's change log (http://www.imagemagick.org/script/changelog.php) to find out what change might have affected its behaviour in regard to PBM files. There ssems to be a change by christy dating from 2007-09-17. Good luck! Wolfgang Hugemann Am 01.10.2010 15:11, schrieb Ted Onley: > > > On 10/1/2010 1:57 AM, Wolfgang Hugemann wrote: >> I tried to reproduce this error with IM 6.6.3-0 Q16 running on Windows. >> It seems to work just fine on my computer. I just did >> >> convert -size 200x200 -depth 2 xc:white test.pbm >> convert test.pbm test.pdf >> >> and it worked just fine. If it does on your computer, too, the flaw must >> be somewhere else. >> >> Where did you get the PBM files from? I think I remember that these are >> sometimes written by pdfimages if monochrome bitmaps are extracted from >> a PDF (?). >> >> Wolfgang Hugemann >> _______________________________________________ >> Magick-users mailing list >> [email protected] >> http://studio.imagemagick.org/mailman/listinfo/magick-users > > I think what I've discovered is that the .pbm files are suspect. We have > old SuSE linux workstations that have a Panasonic color scanner with a > document feeder attached, which we use to scan shipping documents. We > take those scans and produce a PDF of them and store them on a server > for the entire company to have access to. > > We are using SANE to manage the scanner, and what we're getting is a > .pbm file for each page of a scan. A 4 page picking document will scan > as 4 .pbm files. We actually get 5 files. The last file is a 33 byte > file, andt I never determined how that was getting created, so my > program skips that last file and does a convert of the valid files to > stitch together a PDF. > > I've always seen a warning from the convert command about an unexpected > end of file when reading the .pbm files during the convert, but the PDF > was produced, and was fine. Now, I get a hard error on the convert, and > no PDF gets produced. I even went back to version 6.4.5, and still get > the hard error. I'm suspecting that the scanning workstation is > producing a bad .pbm file. I tried opening one of the .pbm files in > Gimp, and Gimp reports a PNM image message - Error reading file. > PhotoShop does open the file with not problem. You can see at the bottom > of the image (end of the page) that there is some extra data that isn't > from the original page that was scanned. If I save the image to a new > file with PhotoShop, then the convert works fine. > > I guess, even though there appears to be an issue with the .pbm files > from the scanning workstations, I'd like to at least have the > functionality I had before. The other issue is that this is running on a > new server. This new installation is on SuSE Enterprise Linux 10 - SP3, > the old was SuSE Enterprise Linux 10 - no service pak, which makes > things that much more difficult to trace. > > Sorry for the long rambling. If you have any thoughts as to how I might > troubleshoot this, I greatly appreciate it! > > Ted > > _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
