What is the most useful java.awt.image.BufferedImage type for off-screen rendering?

I am creating a buffer image that will become a JComponent snapshot (via paint ()) and will be displayed inside ImageIcon . There BufferedImage(int width, int height, int imageType)are a large number of types in the constructor , but which one should I use?

I am sure that any of them will work, but which of them is better than others? How do i choose? And why?

+5
source share
1 answer

See GraphicsConfiguration.createCompatibleImage (int, int) for help, to create a BufferedImage from a "good" type among the many types available.

GraphicsConfiguration ? , . . GraphicsConfiguration getGraphicsConfiguration() getDeviceConfiguration().

+6

All Articles