Perhaps you are using the Level 3 postscript functionality of jpeg2ps It can embed the JPEG file directly.
JDK needs to be able to print on Level 2 postscript printers. The only useful compression available for JPEG in level 2 is the patent encumbered LZW -phil. > Date: Wed, 19 Feb 2003 11:40:26 -0700 > From: "N. Vaidya" <[EMAIL PROTECTED]> > Subject: [JAVA2D] JPEG to Postscript (JPS ???) > To: [EMAIL PROTECTED] > > Hopefully my question below is appropriate to this > Forum. If it is not, my apologies. > > What I am trying to do is to convert a jpeg file > to Postscript using the PrintGIFtoStream.java file > available at > > http://java.sun.com/j2se/1.4.1/docs/guide/jps/spec/JPSTOC.fm.html > > which is an online version of the Java Print Service API User Guide. > > I changed the DocFlavor.INPUT_STREAM.GIF specification to > DocFlavor.INPUT_STREAM.JPEG and changed "java2dlogo.gif" to > "myjpegfile.jpg". Compiling and running this code I got > a "newfile.ps" as the output. This was just great since I > wasn't aware that getting a postscript dump was so > easy in Java 1.4. > > However, when I compared the resulting postscript file size > from Java to that produced by the public domain utility > jpeg2ps, I was a little intrigued to note that the > Java output was much larger. Any particular reason why this > should be so ? > > As a testcase I used the nesrin.jpg file available as part of > the jpeg2ps distribution and compared the resulting postscript > file sizes. The stats are as below: > > jpeg2ps 49 kb > Java 1.4 Mb (uncompressed) & 931 Kb (gzipped) > > Is this expected or am I missing any fine tuning parameters ? > > Any help will be appreciated. > > Regards > > Vaidya > > =========================================================================== > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > of the message "signoff JAVA2D-INTEREST". For general help, send email to > [EMAIL PROTECTED] and include in the body of the message "help". =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
