SetImageProfile(image,"iptc",...) doesen't work
Posted: 2008-01-17T09:09:32-07:00
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
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