- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everybody!
I got some questions concerning image depth conversion and image saving.
First one:
I got a Ippu8 buffer which represents an 24-bit RGB Image in RGBRGBRGB pixel order. I need to save the image in 16-bit representation. How can i make that conversion to a 16-bit representation, like RGB565, most effient?
Second one:
I want to save this 16-bit image to a jpeg file. How can I do that without reimplementing a whole jpeg encoder? The JPEG decoder/encoder example I loaded down from the examples is not able to do that. Has anyone got a solution to this?
Best Regards!
clemens
I got some questions concerning image depth conversion and image saving.
First one:
I got a Ippu8 buffer which represents an 24-bit RGB Image in RGBRGBRGB pixel order. I need to save the image in 16-bit representation. How can i make that conversion to a 16-bit representation, like RGB565, most effient?
Second one:
I want to save this 16-bit image to a jpeg file. How can I do that without reimplementing a whole jpeg encoder? The JPEG decoder/encoder example I loaded down from the examples is not able to do that. Has anyone got a solution to this?
Best Regards!
clemens
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
your request seems to be a bit strange. As you probably know, JPEG standard allow compression only for 8-bit per channel images (if we are not talking about lossless compression, where allowed bit-depths are 2-16 bits). So,you want first to convert 24-bit RGB to 16-bit RGB and after that to compress it as JPEG? In this case JPEG compressor should convert your image back to 24-bit RGB and only after that it will able to apply JPEG compression algorithm.
If you downloaded all the JPEG samples we have, you can find jpeg-cross-arch sample which takes RGB565 as an input (but remember, it convert such image into 24-bit RGB inside).
What is the reason to do double conversion?
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have got very similar issue.
I am sampling Luma and chroma channel coming out of 4:2:2 video source. At receiver after sampling we get Cb0 Y0 CR0 Y1 CB2 Y2 CR2 ... As every alternate luma does not correspond to any chroma, I face problem in making an image file and display it on my PC. Please note I am using Xviewer. Here each pixel has to have 24 bit value. So in order to make .ppm file, I have to upsample the chroma values or simply have to repeat them like Cb0 Y0 CR0 Cb0 Y1 Cr0 CB2 Y2 CR2...
So, is it possible to display a 16 bit image on PC? Is 4:2:2 format used only for bandwidth reduction and compression? And whenever we need display it we have to upsample it by factor of 2.
Please clarify. Let me know if the argument is not clear enough.
Regards,
Ajay
I am sampling Luma and chroma channel coming out of 4:2:2 video source. At receiver after sampling we get Cb0 Y0 CR0 Y1 CB2 Y2 CR2 ... As every alternate luma does not correspond to any chroma, I face problem in making an image file and display it on my PC. Please note I am using Xviewer. Here each pixel has to have 24 bit value. So in order to make .ppm file, I have to upsample the chroma values or simply have to repeat them like Cb0 Y0 CR0 Cb0 Y1 Cr0 CB2 Y2 CR2...
So, is it possible to display a 16 bit image on PC? Is 4:2:2 format used only for bandwidth reduction and compression? And whenever we need display it we have to upsample it by factor of 2.
Please clarify. Let me know if the argument is not clear enough.
Regards,
Ajay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The possibility to display downsampled images directly determines bygraphic system API you use for displaying. For example, it is possible to display RGB565 images on Windows (but remember, Windows will do conversion internally) or it is possible to use hardware possibilities of some video cards to display YUV downsampled data by using DirectX API. It is your choice what better fits your needs.
Regards,
Vladimir

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page