- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, this post to ask help about a problem i've encountered re-encoding bitmap images into jpegs, with any software and windows xp built'in image viewer every image is displayed fine but when i try to visualize the same images using Vista or using DirectX to decode jpeg, colors seem to be swapped (from rgb to bgr or something similar), this is strange because if you use any program different from the image viewer built'in with Vista the jpegs are showed fine, any idea, is there something i was forgetting or even i don't know? Many thanx in advance!
Link Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
what software did you use to encode bitmaps to JPEG? We see no problem with using any image encoding tools, including IPP JPEGView sample
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, thank you for the answer, i use the function SaveImageJpeg taken from ipp jpegview sample, its very strange any images manipulation program(even the windows paint) opens it perfectly except using Vista with its built'in image explorer or if i try to decode it using DirectX the image shows as its bits are swapped, anyway the built jpeg seems to be fine in format.
params.color = JC_RGB;
params.huffman_opt = 0;
params.mode = JPEG_BASELINE;
params.point_transform = 0;
params.predictor = 1;
params.quality = 100;
params.restart_interval = 0;
params.sampling = JS_444;
params.dct_scale = JD_1_1;
these are my setting for the jpeg encoder.
Regards
params.color = JC_RGB;
params.huffman_opt = 0;
params.mode = JPEG_BASELINE;
params.point_transform = 0;
params.predictor = 1;
params.quality = 100;
params.restart_interval = 0;
params.sampling = JS_444;
params.dct_scale = JD_1_1;
these are my setting for the jpeg encoder.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, then most probably your bitmap are in BGR color, so you need to specify JC_BGR to IPP JPEG encoder.
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Uhmm, why programs like paint or gimp and many others open it perfectly? That's really strange, i'll try that, anyway i'm sure my bitmap is rgb and not bgr.
Regards
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok. Do you see the same issue with original IPP JPEGView sample? You can open BMP file and store it as JPEG with this program.
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm seeing exactly same problem, file written with IPP JPEG encoder shows up as BGR in Vista's Explorer. All other programs I've tested (Paint, IrfanView, ImageMagick, XnView, Mozilla Firefox) shows it as RGB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
could you please attach piece of code you use to create JPEG file and resulting JPEG file itself? This might help us to investigate your issue. By the way, most probable reason is that you specify RGB color for internal JPEG image representation which is not general approach although allowed by JPEG specification. Our recomendation is to use YCbCr color space for internal JPEG image representation which leads to better compression.
Note, with IPP JPEG codec you specify color twice. First you need to specify your uncompressed image color space (usually RGB or BGR) and second, you need to specify color space to be used internally by JPEG codec.
Regards,
Vladimir
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