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