Re: JPEG images in Postscript
From: Jeremias Maerki [EMAIL PROTECTED] A bugfix is in CVS now. snip/ Thanks Jeremias, thats Excellent news. Chris _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JPEG images in Postscript
Moving to fop-dev because it gets technical... After a lot of searching I think I know what's wrong. It's not the ASCII-85 filter behaving wrong. Chris' JPEG images contain trailing zero's after the FFD9 (EOI, end of image marker) which fill the images up to 16384 bytes. Now, I guess the error happens because the DCTDecode filter stops working after encountering the EOI marker. Because there is still some data unprocessed and because of the way images are currently written to PostScript this leads to an error. I'm currently figuring out how best to solve this. I'm looking at the code from jpeg2ps which doesn't seem to have a problem with these JPEG files. The code in there is made to ignore any trailing bytes but processes the whole stream twice if I interpret correctly. Maybe looking for the EOI marker in our code and cutting off there is better performance-wise. But jpeg2ps' code is on the safe side in any case. Preferences anyone? On 01.07.2003 17:59:52 Jeremias Maerki wrote: Correction: I've just dropped my current ASCII85OutputStream in the maintenance branch but the bug persists. There's must be another one. Will investigate. On 01.07.2003 17:18:20 Jeremias Maerki wrote: Almost suspected itI believe it's a bug in the ASCII-85 encoder which I've fixed in the redesign but haven't been able to upload, yet. I'll be able to fix the bug for the maintenance branch later this week. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JPEG images in Postscript
A bugfix is in CVS now. On 01.07.2003 16:21:50 Chris Bowditch wrote: I'm having trouble with Postscript generated by FOP 0.20.5rc3a. I have a document containing some JPEG images. The postscript file is produced without error with -d option specified. However, both Adobe Distiller and Ghostview fail to open the Posctscript. This is the output from distiller: %%[ Error: undefined; OffendingCommand: ]%% I found some recent discussion on JPEG image in Postscript in the archives. This problem was caused by gray scale images, but Paint Shop Pro reports my JPEG images as being 24-bit/pixel color. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JPEG images in Postscript
On 02.07.2003 11:06:35 Chris Bowditch wrote: Thanks for the update Jeremias. I would be grateful if you could shed any light on this. One thing I dont understand is what is different about the JPEG files I am using, compared to the ones you mentioned that you used in testing (in past threads on this) Your JPEGs contain a section of zeros at the end. I haven't looked closel, yet, but maybe it's a transparency map. The zeros result in a lot of in the PS code due to ASCII-85 encoding. I'll have to find out what's happening. PSP reports that my JPEGs are 24 bit/pixel and JFIF compliant. Should I convert JPEG to different color depth and/or sub format? As a workaround you could open the JPEG in another editor and save them again. Maybe that helps. But in theory, your JPEGs are fine. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JPEG images in Postscript
Could you send a sample fo and jpeg image? -Original Message- From: Chris Bowditch [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2003 9:22 AM To: [EMAIL PROTECTED] Subject: JPEG images in Postscript Hi All, I'm having trouble with Postscript generated by FOP 0.20.5rc3a. I have a document containing some JPEG images. The postscript file is produced without error with -d option specified. However, both Adobe Distiller and Ghostview fail to open the Posctscript. This is the output from distiller: %%[ Error: undefined; OffendingCommand: ]%% I found some recent discussion on JPEG image in Postscript in the archives. This problem was caused by gray scale images, but Paint Shop Pro reports my JPEG images as being 24-bit/pixel color. Any thoughts on this would be appreciated, Thanks, Chris _ Hotmail messages direct to your mobile phone http://www.msn.co.uk/msnmobile - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JPEG images in Postscript
Almost suspected itI believe it's a bug in the ASCII-85 encoder which I've fixed in the redesign but haven't been able to upload, yet. I'll be able to fix the bug for the maintenance branch later this week. In the meantime you can locally patch PSRenderer.java: Change /ASCII85Decode to /ASCIIHexDecode: if (img instanceof JpegImage) { write( /DataSource currentfile /ASCIIHexDecode filter /DCTDecode filter); and new ASCII85OutputStream to new ASCIIHexOutputStream: OutputStream out = this.out; out = new ASCIIHexOutputStream(out); if (!(img instanceof JpegImage)) { That makes the generated files a bit bigger, but at least they work. On 01.07.2003 16:58:17 Chris Bowditch wrote: thanks for your quick reply. I have attached the fo and two images to this e-mail. Looking at the generated postscript there is a bunch of Z characters in the image data. I was wondering if this could be a transparency issue or something like that. Your thoughts would be greatly appreciated. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JPEG images in Postscript
Most probably, yes. It's a bug that only surfaces with a handful of files. That's probably the reason why it didn't come up before. On 01.07.2003 17:23:38 Clay Leeds wrote: On 7/1/2003 8:18 AM, Jeremias Maerki wrote: Almost suspected itI believe it's a bug in the ASCII-85 encoder which I've fixed in the redesign but haven't been able to upload, yet. I'll be able to fix the bug for the maintenance branch later this week. Just out of curiosity, does this bug affect 0.20.4? Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JPEG images in Postscript
Correction: I've just dropped my current ASCII85OutputStream in the maintenance branch but the bug persists. There's must be another one. Will investigate. On 01.07.2003 17:18:20 Jeremias Maerki wrote: Almost suspected itI believe it's a bug in the ASCII-85 encoder which I've fixed in the redesign but haven't been able to upload, yet. I'll be able to fix the bug for the maintenance branch later this week. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]