I need Your help in generating offscreen images from graphics class and converting them to binary data without setting them visible on screen.
I want to generate large amounts of labels and send them to a printer as binary data. If i create the image, show it on screen and then send it, everything is ok, but i generate 100 labels in one minute and it is annoying when they flicker on the screen of my java aplication.
I want it to be generated by a seperate thread, without visible efects.
If i don't show them, the labels are send black. I tried to generate them, and then show them off screen, that did not match my expectations.
Is there a way to generate "invisible" images from Graphics2d??
or
Is there another way You could suggest me?
Thank You in advance Qba
You can use a
BufferedImage
and usegetGraphics()
to get hold of aGraphics2D
object that paints onto this image.If you're after painting GUI components (if your "label" refers to JLabel for instance) you could have a look at these questions: