Hi,
I am confused over the link between RGB, YUV and awt.Image.
I converted a buffer having RGBFormat data to an awt.Image. I then converted a buffer having YUVFormat data to an awt.Image. I used BufferTo Image.createImage(format) method for the conversion. (RGBFormat and YUVFormat are classes in java for RGB and YUV data). Then when i tried to display the Image object using a BufferedImage object of RGB type and surprisingly i got the same images with both formats.
Is the output awt.Image of RGB and YUV same?
Does Image class store images as RGB (or) How is awt.Image stored?

Thank you in advance...

Recommended Answers

All 3 Replies

They are stored as RGB or YUV as specified, but when you try to display them on an RGB screen it converts (if necessary) to RGB on the fly.

Hi JamesCherrill,
Can you tell me where java does this conversion?
Is it from Image to BufferedImage conversion?

Sorry, don't know the internals of this. It must be quite "late" in the process - ie at the point where it knows that the display is going to an RGB device not (eg) a CMYK print

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.