Page 1 of 1

Load ICC-Profile based image

Posted: 2011-01-31T06:50:25-07:00
by FlashFan
Hi guys

I have raw image-data of 26'099'520 Bytes which is the result of 2480 width* 3508 height * 3 components per pixel.
I have also a ICC-Profile which belongs to the image.

How can I correctly load such an image in Magick++?

I'm currently using the following code:

Code: Select all

Image * image = new Image();
Blob * blob = new Blob(imagedata.c_str(),imagedata.length());
image->read(*blob,Geometry(2480,3508),8,"RGB");
Blob * iccblob = new Blob(iccdata.c_str(),iccdata.length());
image->iccColorProfile(*iccblob);
image->write("result.jpg");
But the colors are the same as when I donĀ“t set the Icc-profile to the image.
And the colors are wrong in both cases.

Thanks for your help!