Dear IM folks,
when I try to clear an IPTC profile (which I have read from &image->iptc_profile - you clam backward compatibility, so that should be OK), with
RemoveImageProfile(image,"iptc");
and thereafter save the image, nothing happens, the profile is still there.
When I try
StringInfo* profile_info;
profile_info = AcquireStringInfo(infoSize);
SetStringInfoDatum(profile_info, info);
SetImageProfile(image,"iptc",profile_info);
profile_info=DestroyStringInfo(profile_info);
then the file gets a little larger (corresponding to the size of IPTC profile) but e.g. identify -verbose shows the old profile.
I suspect that this is becaurse of the two names used ("iptc" and "8bim") in the source code and becaurse of that the profile might be saved two times.
Please advice how to work around this - and if you need more info.
Jacob Nordfalk
SetImageProfile(image,"iptc",...) doesen't work
Re: SetImageProfile(image,"iptc",...) doesen't work
Is seems that changing from
SetImageProfile(image,"iptc",profile_info);
to
SetImageProfile(image,"8bim",profile_info);
makes the IPTC profile be set correctly.
Could you please state the correct names to be used in this method call?
I would like to see http://www.imagemagick.org/api/profile.php updated to state the correct thing.
E.g. change
% o name: The profile name.
To
% o name: The profile name. Valid names are "icc", "exif" and "8bim" (for IPTC data - "iptc" should be avoided)
Thanks,
Jacob Nordfalk
% SetImageProfile() adds a named profile to the image. If a profile with the
% same name already exists, it is replaced. This method differs from the
% ProfileImage() method in that it does not apply CMS color profiles.
%
% The format of the SetImageProfile method is:
%
% MagickBooleanType SetImageProfile(Image *image,const char *name,
% const StringInfo *profile)
%
% A description of each parameter follows:
%
% o image: The image.
%
% o name: The profile name.
%
% o profile: A StringInfo structure that contains the named profile.
%
SetImageProfile(image,"iptc",profile_info);
to
SetImageProfile(image,"8bim",profile_info);
makes the IPTC profile be set correctly.
Could you please state the correct names to be used in this method call?
I would like to see http://www.imagemagick.org/api/profile.php updated to state the correct thing.
E.g. change
% o name: The profile name.
To
% o name: The profile name. Valid names are "icc", "exif" and "8bim" (for IPTC data - "iptc" should be avoided)
Thanks,
Jacob Nordfalk
% SetImageProfile() adds a named profile to the image. If a profile with the
% same name already exists, it is replaced. This method differs from the
% ProfileImage() method in that it does not apply CMS color profiles.
%
% The format of the SetImageProfile method is:
%
% MagickBooleanType SetImageProfile(Image *image,const char *name,
% const StringInfo *profile)
%
% A description of each parameter follows:
%
% o image: The image.
%
% o name: The profile name.
%
% o profile: A StringInfo structure that contains the named profile.
%
Re: SetImageProfile(image,"iptc",...) doesen't work
I repeat my request (with hopes of a reaction):
Jacob Nordfalk
Thank youCould you please state the correct names to be used in this method call?
Jacob Nordfalk
Re: SetImageProfile(image,"iptc",...) doesen't work
IPTC and 8BIM are both valid profile names. 8BIM is a container that among other things can embed an IPTC profile. So the answer is that if the IPTC profile is within a 8BIM container, use "8BIM". If the IPTC profile is a pure IPTC profile with no wrapper, use "IPTC".