- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm using w_ipp_7.0.2.154_ia32 and w_ipp-samples_p_7.0.2.048. I've found that after converting jpeg lossless image by picnic and uic_transcoder_con to .bmp colors in output are different (yellow or blue ruler on the right side of image). I thinkpicnic's outputis correct. My code mostly copied/pasted from uic_transcoder produces wrong resultcorrespondingly. Could you please point me what should be fixed in in uic_transcoder_con to get correct results?
Attachments:
jplossless.jpeg - original file
jplossless_picnic.bmp - picnic's output
jplossless_con.bmp - uic_transcoder_con's output
Regards,
Leonid
I'm using w_ipp_7.0.2.154_ia32 and w_ipp-samples_p_7.0.2.048. I've found that after converting jpeg lossless image by picnic and uic_transcoder_con to .bmp colors in output are different (yellow or blue ruler on the right side of image). I thinkpicnic's outputis correct. My code mostly copied/pasted from uic_transcoder produces wrong resultcorrespondingly. Could you please point me what should be fixed in in uic_transcoder_con to get correct results?
Attachments:
jplossless.jpeg - original file
jplossless_picnic.bmp - picnic's output
jplossless_con.bmp - uic_transcoder_con's output
Regards,
Leonid
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Leonid,
could you have a check on the first attachment, jplossless.jpeg? We can not download this file here.
Thanks,
Chao
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Leonid,
when we decoding this lossless jpeg file the color type of image is seted to IC_UNKNOWN - this means that decoder can`t determine correct color of compressed data and gives image after decoding "as is" without any color transformation. Later in Picnic application we are trying to suggest wich color is used. This suggestion is based on number of image channels and looks like:
[bash] if(IC_UNKNOWN == image.Color()) { switch(image.NChannels()) { case 1: image.Color(IC_GRAY); break; case 3: image.Color(IC_RGB); break; case 4: image.Color(IC_RGBA); break; default: break; } }[/bash]
This suggestion is needed to determine output params for displaying. And seems we are make a correct guess in this case - original image color is RGB.
But in transcoder no such suggestion (but i think must be and i`m going to add it). And image saved in RGB chanel order, but need to be converted to BGR before saving. The simplest way to resolve this issue is add such suggestion in SaveImageBMP() function just after strings:
[bash] switch(image.NChannels()) { case 1: imageCn.ColorSpec().SetEnumColorSpace(Grayscale); break; case 3: imageCn.ColorSpec().SetEnumColorSpace(BGR); break; case 4: imageCn.ColorSpec().SetEnumColorSpace(BGRA); break; default: break; } // put this suggestion here[/bash]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As far as I know, lossy JPEG is normally YCBCR, and lossless JPEG is normally RGB (not BGR).
The format of lossless JPEG does not have a standard, but most codecs use RGB.
The format of lossless JPEG does not have a standard, but most codecs use RGB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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