Sorry for my bad English.
I'm writing simple tiff to jpeg convertor using MagicWand. Some of this tiff images have embed AdobeRGB color profile. How can I convert images with applying this color profile? I'm trying to use this code but input and output images are not similar:
Code: Select all
MagickReadImage(wand, strdup([path UTF8String]));
size_t profileLength = 0;
unsigned char* profile = MagickGetImageProfile(wand, "icc", &profileLength);
MagickSetImageFormat(wand, "jpeg");
MagickSetImageCompression(wand, JPEGCompression);
MagickSetImageCompressionQuality(wand, 80);
MagickSetImageProfile(wand, "icc", profile, profileLength);
MagickProfileImage(wand, "icc", profile, profileLength);
MagickWriteImage(wand, strdup([writePath UTF8String]));