Member
Member
wibbi   08-03-2018, 18:57
#1

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.

Member
Member
wibbi   08-03-2018, 19:42
#2

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?

Administrator
Administrator
acrylian   08-03-2018, 19:44
#3

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.

Member
Member
wibbi   08-03-2018, 19:53
#4

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.)

Member
Member
wibbi   08-03-2018, 20:05
#5

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.

Member
Member
sbillard   13-03-2018, 23:59
#6

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.

Member
Member
wibbi   14-03-2018, 11:21
#7

@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

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.