> does anyone know how to convert a Graphics2D-Object directly to a
> JPEG-File?
Jonathan already responded with a pointer to some example code, but I
just wanted to clarify for Oliver and others who may have missed a subtle
point.
A Graphics2D object has no pixels. It is an object to operate on pixels
(or in some cases it can operate on an output device which doesn't really
have "pixels" such as a printer).
It either points to an output device, or to an image in memory. If it
points to an image, then you can get the pixels from that image and
operate on them directly. If it points to an output device then we
have no APIs currently that let you get the pixels of a window or
printer (and it takes a sophisticated printer driver to support the
notion of reading back pixels...).
...jim
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 2D Home Page: http://java.sun.com/products/java-media/2D/