Re: Lossless EXIF strip from JPEG?
Anthony Thyssen <[email protected]> Mon, 9 May 2011 11:51:07 +1000
| Newsgroups | gmane.comp.video.image-magick.user |
|---|---|
| Message-ID | <20110509115107.148b1e18@wraith> |
On Sun, 8 May 2011 18:00:27 EDT [email protected] wrote: | | 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 If you just want a command line tool look at jhead http://www.sentex.net/~mwandel/jhead/ It is a simple package install for most Linux systems, probably Macs too. Anthony Thyssen ( System Programmer ) <[email protected]> -------------------------------------------------------------------------- How many hardware guys does it take to change a light bulb? "Well the diagnostics say it's fine buddy, so it's a software problem." -------------------------------------------------------------------------- Anthony's Castle http://www.ict.griffith.edu.au/anthony/