PHP Forums Archive

remove EXIF IPCT/data

Tags: upload, ImageMagick, photos, exif

hosam76 posted on 2009-11-03 15:49:59 #

hi
Im using the PHP Upload Script ver. 2.31
to upload and resize photos
but I'm wondering if the script can remove the EXIF IPCT/data
because it make the photos bigger
thanks

Comments / discussions

Olaf posted on 2009-11-03 15:53:14 #

Hi,

can you remove the photo's meta data offline?

hosam76 posted on 2009-11-03 19:03:42 #

yes I can if I want to upload it by myself
but I use this script to receive the photos from the site visitors.

Olaf posted on 2009-11-03 19:20:47 #

Just checked the PHP manual and it seems that the PHP EXIF functions are only able to read the data. Check google for some command line tools and execute them during the upload process.

About how many KB are we talking about?

hosam76 posted on 2009-11-04 02:22:32 #

Quote from: Olaf
"
About how many KB are we talking about?"

see
one visitor upload 13 image with size 2 MG
I dwonload it and remove the EXIF
the 13 photos become 540 KB
the diffrent around 1.5 MG
so imagin if we receive hundred of photos monthly

Olaf posted on 2009-11-04 08:02:08 #

Really?
Are you sure that this is not because of some compression?
this must be a big issue on the Internet, are there discussions about this?

On the other site I'm asking myself, how services like flickr or twitpic handle this...

hosam76 posted on 2009-11-04 12:32:25 #

I made another test
I resize 10 photos taken by my Nikon camera
witht the same setting of the resize program except the keep or remove exif:
when I left the EXIF the total size:1.16 MB
when I remove the EXIF the total size: 650 KB

I rebeat the test for 50 Photos
with EXIF 6.5MG
witout EXIF 3.35 MG

so I think with big numbers of photos the EXIF made good difference.

Olaf posted on 2009-11-04 12:42:28 #

just found this information:

After ImageMagick is installed, you will have /usr/bin/mogrify available. The mogrify command can be used to strip Exif data from images.

mogrify -strip imagename.jpg

Imagemagick is available for your hosting account?