note 54435 deleted from function.iptcembed by levim
| From: | levim@php.net | Date: | Mon, 28 Apr 2014 14:11:19 +0000 |
| Subject: | note 54435 deleted from function.iptcembed by levim | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-199345@lists.php.net to get a copy of this message | ||
Note Submitter: thomas at anakrome dot net
----
here is a small code to remove all header from a jpg file, including IPTC, Exif, XMP...
function remove_XMP($image_in, $image_dest) {
$filename_in = addslashes($image_in);
list($width, $height) = getimagesize($filename_in);
$image_dest = imagecreatetruecolor($width, $height);
$image = imagecreatefromjpeg($filename_in);
imagecopyresampled($image_dest, $image, 0, 0, 0, 0, $width, $height,
$width, $height);
imagejpeg($image_dest, $filename);
}
the problem comes from Photoshop CS cannot read IPTC if XMP is present.
removing XMP and other header _before_ adding IPTC with iptcembed is a good way.