views:

104

answers:

3

Privacy concerns have lead me to believe I should scrub user uploaded images for any meta data.

I know that JPEG have EXIF, but I'm not sure about PNG or GIF (both are able to be uploaded to my site from the public).

Do these formats have meta data too, and how is it stored? What is the best way to remove it?

I'm using PHP 5.29.

Thanks

A: 

both have metadata ;)

nacho4d
Care to elaborate please?
alex
A: 

All images which use any sort of compression contain metadata. Some are very modest, while other formats tell you more than you would ever need.

Esko
Not really an answer to his question IMO. He is specifically asking about privacy relevant data (Type of camera used, location, software used...)
Pekka
+2  A: 

The easiest way is to copy them to a new image with GD - you keep all the image info, but get rid of the metadata.

Maerlyn
+1 the most thorough solution - keep in mind though that you're going to experience at least slight image loss in most cases. GD's JPEG quality is *awful*. If possible, use ImageMagick.
Pekka
This is good, as all my public facing versions of the images *have* been scaled down with GD. If GD drops the meta data by default, I'm in the clear :).
alex