2

I have php script that creates a temporary watermark image for users that are not logged in. The original image contains IPTC (metadata) information that I would like to retain, however, when the watermark is applied and imagejpeg is called, all metadata is removed.

Any ideas how I can maintain the metadata or re-apply metadata after imagejpeg gets called?

Thanks

Ben
  • 67
  • 3
  • 7

1 Answers1

3

This is just what the iptcparse and iptcembed functions are for.

  • What happens if you var_dump() the results of iptcparse(), as in the example on the PHP.net example? –  Sep 07 '09 at 03:12
  • I just found that my temporary image file wasn't being saved properly thanks to a typo. So the IPTC information was attempting to be written to a file with size 0. Fixed and working fine now, thanks! – Ben Sep 07 '09 at 03:30