12 Nov
2013
12 Nov
'13
11:34 a.m.
On 12 November 2013 04:21, Guangchao Wang <guangchao0831@gmail.com> wrote:
I used following code:
rgb8_image_t rgb8Img;
jpeg_read_and_convert_image("CMYK.jpg", rgb8Img); //CMYK.jpg is CMYK image
jpeg_write_view("RGB.jpg", const_view(rgb8Img));
to convert CMYK image to RGB image.
The saved RGB.jpg is not correct.
Could you give me some suggestion?
Try this to see if all steps separately will work: cmyk8_image_t cmyk; jpeg_read_image("CMYK.jpg", cmyk); rgb8_image_t rgb(cmyk.dimensions()); copy_pixels(color_converted_view<rgb8_pixel_t>(view(cmyk)), view(rgb)); jpeg_write_view("RGB.jpg", const_view(rgb)); Best regards, -- Mateusz Loskot, http://mateusz.loskot.net