Load ICC-Profile based image

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
FlashFan
Posts: 13
Joined: 2011-01-05T03:41:09-07:00
Authentication code: 8675308

Load ICC-Profile based image

Post 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!
Post Reply