gld64 has asked for the wisdom of the Perl Monks concerning the following question:

My website is hosted on SiteGround. I need my Perl script to read a JPEG's metadata, namely the description and date, ex: Mom and Dad at Niagara Falls. I used ImageMagick but it replaces international characters like (é) with two decimal points (..) Is ImageMagick overkill for reading two metadata fields, since I'm not planning to manipulate the images? Is there a more direct way for Perl to do this? Is there an alternative to ImageMagick which does read international characters? PS. here's part of my code - which I copied from the net
# -------------------------------------- use Image::Magick; my $image = Image::Magick->new; $image->Read('pic.jpg'); my %exif = map { s/\s+\z//; $_ } map { split /=/, $_ } split /exif:/, $image->Get('format', '%[EXIF:*]'); my $s = $exif{'ImageDescription'}; # --------------------------------------
Thanks for all and any information, Guy

Replies are listed 'Best First'.
Re: ImageMagick JPEG metadata foreign characters
by Anonymous Monk on Feb 05, 2016 at 23:53 UTC