Thanks for all the input. The reason why my image was not showing up
was that I had set the background to white and had NOT set the
(foreground)
color to black. The default seems to be background black and foreground
white.

thanks
mathew

Mathew Chacko wrote:
> 
> I am just starting to look at the Graphics2D api and specially
> interested
> in creating graphics on the fly and saving it to disk.
> 
> I am using the JPEG encoder from com.sun.image.codec.jpeg package.
> Essentially I
> 
> 1. create a Buffered image
> 2. get the Graphics2D object from the buffered image
> 3. draw stuff on the Graphics2D object
> 4. create a JPEGImageEncoder with a target output stream (using
> FileOutputStream)
> 5. get the default JPEG Encode param
> 6. encode the buffered image
> 7. flush and close the output stream
> 
> When I view the file created it is completely blank (none of the stuff
> that
> I drew on the Graphics2D object is present).
> 
> Any clues would be appreciated.
> 
> thanks
> mathew
> =====================================================================
> To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
> Java 2D Home Page: http://java.sun.com/products/java-media/2D/
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 2D Home Page: http://java.sun.com/products/java-media/2D/

Reply via email to