Answer the question
In order to leave comments, you need to log in
Why is the exif file not saved?
When uploading images to the server, the server compresses them. It is logical that the exif file is lost. But using the tool getImageProperty and setImageProperty I'm trying to write exif to a new file. The function returns true - which means that the data was successfully written, but in fact it is empty. CHADNT?
The code I'm testing on:
$image = new \Imagick('IMAG0400.jpg');
$exif = $image->getImageProperties();
$image->thumbnailImage(600, 800);
foreach($exif AS $prop => $value){
Echo 'Set '.$prop.' => '.$value.': '.print_r($image->setImageProperty($prop, $value),1).PHP_EOL;
}
$image->writeImage('IMAG0400_CROP.jpg');
$image = new Imagick('IMAG0400_CROP.jpg');
print_r($image->getImageProperties());
Answer the question
In order to leave comments, you need to log in
quick googling gave the answer , in short - they can ONLY EDIT exif, he can't add properties.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question