tags:

views:

87

answers:

1

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

+1  A: 

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

cpharmston
I've tried them, but apparently not correctly...
bhays
What happens if you var_dump() the results of iptcparse(), as in the example on the PHP.net example?
cpharmston
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!
bhays