im trying to create thumbnails on the fly with jason hunter's multipart
parser.. and using the sun codex package.

the uploading is real smooth and it works perfectly.. however, when i try to
add another level of
functionality (scale down images to a thumbnail), i'm running into some
issues..

i'm using a method called getInputStream(), which returns an input stream of
file you're trying to write to disk.
however, when i try to decode with sun's JPEG Decoder, i get an error:

com.sun.image.codec.jpeg.ImageFormatException: Not a JPEG file: starts with
0xff 0xd9 -->
(input stream return value is =
"com.oreilly.servlet.multipart.PartInputStream@58e902")

has anyone used this package for creating thumbnails and could give me a few
pointers?



code used below..

JPEGImageDecoder decoder =
JPEGCodec.createJPEGDecoder(fpart.getInputStream());
decoder.decodeAsBufferedImage();

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to