8BIMTEXT profile wont attach to new image

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
qwertywin
Posts: 11
Joined: 2010-04-13T08:02:18-07:00
Authentication code: 8675308

8BIMTEXT profile wont attach to new image

Post 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.
Post Reply