note 103610 modified in function.iptcembed by danbrown
| From: | danbrown@php.net | Date: | Fri, 22 Apr 2011 12:11:53 +0000 |
| Subject: | note 103610 modified in function.iptcembed by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-179081@lists.php.net to get a copy of this message | ||
To remove all EXIF, XMP etc. tags from a jpeg file you need no resampling (which, by the way, may
give you memory problems). It's just enough to recreate the image, presumably with 100% quality
in order not to loose anything. The code is as simple as that:
<?php
$img = imagecreatefromjpeg ($path);
imagejpeg ($img, $path, 100);
imagedestroy ($img);
?>
--was--
Removing all metadata tags from a jpeg (addendum to an old post by Thomas and Bryce).
To remove all EXIF, XMP etc. tags from a jpeg file you need no resampling (which, by the way, may
give you memory problems). It's just enough to recreate the image, presumably with 100% quality
in order not to loose anything. The code is as simple as that:
<?php
$img = imagecreatefromjpeg ($path);
imagejpeg ($img, $path, 100);
imagedestroy ($img);
?>
http://php.net/manual/en/function.iptcembed.php