Link to home
Start Free TrialLog in
Avatar of JoshWegener
JoshWegener

asked on

PHP - How to store data inside a JPG Image

ok, so I have a JPG image, I want to be able to store data inside this image... like a description or somthing... how would go about storing this data inside the image so I can read / set it using PHP?

If I have more data (not just a description) where / how can I store that data in the image ?
ASKER CERTIFIED SOLUTION
Avatar of Roger Baklund
Roger Baklund
Flag of Norway image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JoshWegener
JoshWegener

ASKER

Aww, I love this... Thanks!

I take it this only works for JPG ? What about PNG ? or TIFF ? BMP ?
No, only jpeg.
When I look at the code (IPTC.php) - it appears you can only use predefined tags... is this true? or can you add your own to that list?
To maintain compatibillity with other software, you must use predefined tags. But for your own usage, you could create custom tags.

Note that IPTC as such is not limited to jpeg, but this particular function is.

http://en.wikipedia.org/wiki/IPTC_(image_meta-data)
http://www.iptc.org/