I am programming in Delphi and have succeeded in reading in an image, resizing it, and then writing it back out to a new location so I am calling the ImageMagick API successfully. It is the IPTC meta data which is defeating me. Here is what I have written in my code:
Code: Select all
pansi := MagickRemoveImageProfile(Wand, PAnsiChar('IPTC'), @len);
if pansi = nil then
Exit;
Result := MagickSetImageProfile(Wand, PAnsiChar('IPTC'), @IPTC[0], length(IPTC)) = MagickTrue;
This is how I write the file:
Code: Select all
Result := MagickWriteImages(Wand, PAnsiChar(AnsiName), MagickFalse) = MagickTrue;