Page 1 of 1

8BIMTEXT profile wont attach to new image

Posted: 2013-10-30T13:07:45-07:00
by qwertywin
Version of IM: ImageMagick 6.4.2 11/20/12 Q16 OpenMP

So I have the following php code to attach a some IPTC headers into my image using 8BIMTEXT, but I can't for the life of me get it working

Code: Select all

<?php

  $imWand2 = NewMagickWand();

  MagickReadImage( $imWand2, "testinput.jpg" );

  $meta = "2#40#Special Instructions=\"test text\"";

  MagickStripImage( $imWand2 );
  MagickProfileImage($imWand2, '8BIMTEXT', $meta );
  MagickWriteImage( $imWand2, "testoutput.jpg" );

?>
So it doesnt matter what image I am using it still fails

where if I use straight convert on the commandline "convert testinput.jpg -profile test.8BIMTEXT testoutput.jpg" it works perfectly fine, so either I am doing something completely wrong or magickwand and IM arent playing nice.