Re: Lossless EXIF strip from JPEG?
[email protected] Sun, 8 May 2011 18:00:27 EDT
| Newsgroups | gmane.comp.video.image-magick.user |
|---|---|
| Message-ID | <[email protected]> |
Thank you Ludo!
With the Image::ExifTool Perl module installed, I found the following to
be equivalent to the command line method. For execution from a script
without a system call. In case anyone is interested in the future:
use Image::ExifTool;
$exifTool = new Image::ExifTool;
$exifTool->SetNewValue('*'); # delete all...
$exifTool->WriteInfo('original_image.jpg','modified_image.jpg');
$errorMessage = $exifTool->GetValue('Error');
print $errorMessage; # (if has value an error occurred)
Took some figuring because I was thinking I'd need to load the image before
changing it. Turns out I needed to assign the setting first using
SetNewValue then load and save simultaneously using WriteInfo.
~Rob
In a message dated 5/8/2011 2:34:23 P.M. Central Daylight Time,
[email protected] writes:
Hi,
exiftool (written in Perl) does this very easily:
exiftool -exif:all= filename.jpg
Ludo
On Sun, May 8, 2011 at 2:14 PM, <[email protected]> wrote:
> I'd like the ability to remove the EXIF information (including
thumbnail,
> metadata, camera info... everything!) from JPEG files, but I want to
avoid
> recompression.
>
> I'm looking for a Unix/Linux solution that can be interfaced via Perl
> (such as ImageMagick can be used via PerlMagick). I am familiar with
> ImageMagick "-strip" and the result seems to need be recompressed.
>
> Suggestions welcome!
>
> Thanks,
>
> Rob
> _______________________________________________
> Magick-users mailing list
> [email protected]
> http://studio.imagemagick.org/mailman/listinfo/magick-users
>
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users