Hello Partha,

You can use JPEGImageEncoder shipped with J2SE. Here's an example:

import com.sun.image.codec.jpeg.*;
import java.awt.image.*;

BufferedImage bi = new BufferedImage(300, 300, BufferedImage.TYPE_INT_RGB);
Graphics g = bi.getGraphics();

//do the drawing on g...

JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out); //out ->
stream to write generated image...
JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bi);
encoder.encode(bi, param);

Hope this helps!

Regards,

- Tapio




|---------+------------------------------------>
|         |           Partha Ranjan Das        |
|         |           <partharanjan.d@SONATA-SO|
|         |           FTWARE.COM>              |
|         |           Sent by: A mailing list  |
|         |           about Java Server Pages  |
|         |           specification         and|
|         |           reference                |
|         |           <[EMAIL PROTECTED]|
|         |           M>                       |
|         |                                    |
|         |                                    |
|         |           07.02.2003 07:51         |
|         |           Please respond to A      |
|         |           mailing list about Java  |
|         |           Server Pages             |
|         |           specification            |
|         |           and reference            |
|         |                                    |
|---------+------------------------------------>
  
>------------------------------------------------------------------------------------------------------|
  |                                                                                    
                  |
  |       To:       [EMAIL PROTECTED]                                          
                  |
  |       cc:                                                                          
                  |
  |       Subject:  Dynamic jpeg generation                                            
                  |
  
>------------------------------------------------------------------------------------------------------|




Hi,

Has anybody worked on dynamic generation of jpeg, gif images using some
API?
How can it be done? I need to use one such thing.
Thanks in advance.

Regards,
Partha
*********************************************************************
Disclaimer: The information in this e-mail and any attachments is
confidential / privileged. It is intended solely for the addressee or
addressees. If you are not the addressee indicated in this message, you may
not copy or deliver this message to anyone. In such case, you should
destroy
this message and kindly notify the sender by reply email. Please advise
immediately if you or your employer does not consent to Internet email for
messages of this kind.
*********************************************************************

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

Reply via email to