I suppose you have retrieved a ResultSet object (say, rs), and also know
that which column number (say, i) the image is stored in.

If I recall correctly, you may use rs.getBinaryStream(i) to retrieve the
image as an InputStream. You can then process it with any of the
InputStream wrappers to get at the bytes associated with image. (Please
note that this approach works fine for large binary objects - for the
others, just use rs.getBytes(i) to get an array of bytes).

Use this byte array to create an Image object (thru a ClassLoader, etc).

This image object may then be encoded into a gif or jpeg using various
JPEG and GIF encoders (refer www.acme.com for some).

Hope it helps.

- Uddipan.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to