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...

8 Years
Discussion Span
Last Post by JamesCherrill

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.