Philip,

Absolutely, You really shouldn't use com.sun.image.codec.jpeg.JPEGCodec.

Code that uses this can't expect to run on all compatible Java
implementations. Image I/O has been around since 1.4 and is
the standard supported solution.

FYI this is quite timely as we are soon to propose at the very least the
complete hiding of this API to new development in JDK 7.
I will send out more email on this sometime soon.

-phil


Roman Kennke wrote:
Hi Philip,

While I understand one should not use this class, a lot of projects still do.

You really shouldn't! ;-)

Under JDK6, the following is actually resulting in a compile failure.
 com.sun.image.codec.jpeg.JPEGCodec is Sun proprietary API and may be removed 
in a future release

Can anyone steer me towards the proper way to outputting a jpeg image if we 
can't use the com.sun.* classes?

javax.imageio.ImageIO.write(image, format, stream) is most likely what
you want.

Cheers, Roman

--
http://kennke.org/blog/

===========================================================================
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".

Reply via email to