Resize and thumbs with EXIF Data?

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.

Comments

  • wibbi Member

    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?

  • acrylian Administrator, Developer

    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.

  • wibbi Member

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

  • wibbi Member

    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

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

    Works.

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

  • wibbi Member

    @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

Sign In or Register to comment.