no ICC profile conversion perfrmd - Magick::Image::profile()
Posted: 2011-02-06T11:36:56-07:00
Hi,
I am using the C++ API - I have a aRGB jpg loaded into memory and construct a Image object and wish to perform a ICC color profile conversion.
However, when I view the converted.jpg image, there is no conversion. It looks exactly the same as the original aRGB image. Using exiftool, I also see no reference to the expected target (sRGB) profile.
When I use the convert util
the converted image (sRGB.jpg in this case) has clearly had the conversion applied.
I can see that Magick::Image::profile() simply calls ProfileImage(), whose comments in profile.c state that
thanks in advance
I am using the C++ API - I have a aRGB jpg loaded into memory and construct a Image object and wish to perform a ICC color profile conversion.
Code: Select all
Magick::Image magick(argv[1]);
uchar_t* profile = NULL;
size_t profile_length = 0;
// alloc buf space for profile and read target ICC profile from disk
...
magick.profile("ICM", Magick::Blob(profile, profile_length) );
magick.quality(100);
magick.write("converted.jpg");
When I use the convert util
Code: Select all
convert -profile NKAdobe.icm aRGB.jpg -profile NKsRGB.icm sRGB.jpg
I can see that Magick::Image::profile() simply calls ProfileImage(), whose comments in profile.c state that
Am I mis-using the API? Additionally, how would I specify which rendering intent (for example, perceptual) to use during the conversion?ProfileImage() associates, applies, or removes an ICM, IPTC, or generic profile with / to / from an image. If the profile is NULL, it is removed
thanks in advance