Trouble retrieving information from an Embedded Profile
Posted: 2012-09-04T13:35:56-07:00
I am currently attempting to get ahold of an embedded profile from within an image using the MagickWand API, but to no avail. I am not even sure if it is seeing the profiles there at all. They definately show up in the images when they are loaded up in any standard image processing application such as GIMP. First I get a hold of the image. The following gets the image from a src path and the embeddedProfileImage has properties in it such as the correct width, height, etc.
Image *embeddedProfileImage;
MagickBooleanType status;
status = MagickReadImage(magick_wand, [pathToProfiledImage cStringUsingEncoding:NSUTF8StringEncoding]);
embeddedProfileImage = GetImageFromMagickWand(magick_wand);
return [_renderer createFragmentShaderForEmbeddedImage:embeddedProfileImage destinationProfilePath:dstPath];
...
Then, I attempt to get information about the profile from the (Image *)embeddedProfileImage, however, it always returns a null/empty value. The documentation does not seem helpful and I can't find examples of extracting embedded profile data from source code.
...
const StringInfo *profileInfo;
size_t *profileLength;
profileInfo = GetImageProfile(embeddedProfileImage, profileData);
profileInfo = RemoveImageProfile(embeddedProfileImage, "ICC");
???
Something that I am not doing correctly? I have attempted several different approaches to no avail.
Image *embeddedProfileImage;
MagickBooleanType status;
status = MagickReadImage(magick_wand, [pathToProfiledImage cStringUsingEncoding:NSUTF8StringEncoding]);
embeddedProfileImage = GetImageFromMagickWand(magick_wand);
return [_renderer createFragmentShaderForEmbeddedImage:embeddedProfileImage destinationProfilePath:dstPath];
...
Then, I attempt to get information about the profile from the (Image *)embeddedProfileImage, however, it always returns a null/empty value. The documentation does not seem helpful and I can't find examples of extracting embedded profile data from source code.
...
const StringInfo *profileInfo;
size_t *profileLength;
profileInfo = GetImageProfile(embeddedProfileImage, profileData);
profileInfo = RemoveImageProfile(embeddedProfileImage, "ICC");
???
Something that I am not doing correctly? I have attempted several different approaches to no avail.