ZenphotoCMS Forum
Resize and thumbs with EXIF Data? - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Resize and thumbs with EXIF Data? (/thread-13070.html)



Resize and thumbs with EXIF Data? - wibbi - 2018-03-08

Why are the EXIF meta tags included in the resize images and the thumbnails? That's amazing. A Thumbnail with EXIF meta tags!

How to delete the EXIF data when creating the resize images and thumbnails?

I don't like resizes and thumbs with EXIF data.




Resize and thumbs with EXIF Data? - wibbi - 2018-03-08

OK, i have understand it. Zenphoto don't use Imagick -strip.
$img->stripImage();

(elFinder use it, but i don't use elFinder)

Question: How can i put the stripImage() in the Zenphoto core code? What is the best place?




Resize and thumbs with EXIF Data? - acrylian - 2018-03-08

Indeed GD does not keep metadata at all as far as I know while Imagick does. I cannot answer right now about the place but seems like a generally useful option.




Resize and thumbs with EXIF Data? - wibbi - 2018-03-08

I would be very grateful if you would do something about it.
I've already looked at the /zp-core/lib-Imagick.php, but I do not know where to put it.
(I also do not want to wait for a release with this option.)




Resize and thumbs with EXIF Data? - wibbi - 2018-03-08

Oooops, that was not a strange thing. I solved for me.
I hav put it in the interlace option/function, that it's enabled by me.
/zp-core/lib-Imagick.php

[code]if ($interlace) {
$im->setInterlaceScheme(Imagick::INTERLACE_JPEG);
$im->stripImage();
}[/code]

Works.




Resize and thumbs with EXIF Data? - sbillard - 2018-03-13

The actual copying of this metadata is done in the zp_resampleImage() function.
foreach ($src_image->getImageProfiles() as $name => $profile) { $dst_image->profileImage($name, $profile); }

If you don't want the exif in any resized images just delete (or comment out) those lines. However you might want to consider leaving in the ICC profile. Someday browsers might even pay attention to it.




Resize and thumbs with EXIF Data? - wibbi - 2018-03-14

@sbilliard, thanks for the hint. There is a little bit more complicated. I have read the stripImage() manual befor put it in the code and this was not a final solution.

  1. Extract the ICC profile
  2. Strip EXIF data and image profile
  3. Add the ICC profile back

In the comments: http://php.net/manual/de/imagick.stripimage.php