|
With JDK 1.2, you don't need display at
all.
Simply create an image like this:
BufferedImage
img =
new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); Graphics g = img.getGraphics(); then draw in g
then you can use any encoder that will encode an image to an
outputstream
For GIF you can use ACME package
for JPEG the JDK 1.2 include a JPEGImageEncoder
JPEG is faster, but images are far bigger
jdk 1.3 was supposed to include a PNG encoder
(like JPEG) , but I didn't find it (I don't want to use adavanced Imaging, just
for that).
Have you found it ?
this PNG encoder works well, but I have some pbs
with PNG on Internet Explorer (looks like IE not recognize the png MIME type, i
set the content type to image/png
Any Hint ?
|
- Generating image file ? Boon Huat
- Re: Generating image file ? Madhavi Karanam
- Re: Generating image file ? Sandesh
- Re: Generating image file ? Baglan Dosmagambetov
- Generating image file ? andy C
- Re: Generating image file ? Rob Rodgers
- Re: Generating image file ? Robert Crawford
- Re: Generating image file ? Jason Hunter
- Re: Generating image file ? Thomas Weitzel
- Re: Generating image file ? Danny Rubis
- Daniel HERLEMONT
