views:

38

answers:

1
+1  Q: 

Java Image Writing

I want to create thousands of dynamic images with Java. I've created a JFrame and a LayeredPane and put a JLabel on this. Then I am writing image contents in this JLabel. Then I create this image of this LayeredPane like this

BufferedImage image = (BufferedImage)comp.createImage(width, hight);

It creates the image perfectly but its size is 20KB (more or less). Can I reduce the image size without losing its quality. I have just text and colour in JLabel.

OR

Is there another way to create images based on Text?

Thanks in Advance

A: 

You can reduce its size on disk by saving as JPEG and reducing the Q. This has least impact on quality. Resampling has major impact.

EJP
I'm already saving in JPEG format.
Stacker
So it is the size on disk that matters, rather than the size in memory?
Andrew Thompson