Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: XMP, Image::ExifTool, strawberryperl

by mrkjell (Initiate)
on Nov 26, 2009 at 19:53 UTC ( #809648=note: print w/ replies, xml ) Need Help??


in reply to Re: XMP, Image::ExifTool, strawberryperl
in thread XMP, Image::ExifTool, strawberryperl

Hi. Thank you for your reply. I really appreciate it. Yes, it looks like ExifTool works fine, but the XMP data is not readable when I try to dump this information with exiv2 ( on linux ). I did not make it work with "The PHP Metadata Toolkit".
It might be that ExifTool is folowing the standards, but the files is not readable for other tools, so this is my problem.
exampe:

#I tag a file like this: my $exifTool = new Image::ExifTool; $exifTool->ExtractInfo($image); $exifTool->SetNewValue('XMP:Headline' => "heisannheisann"); $exifTool->WriteInfo($image);
When I look at this file with the string util in linux, I get this block:
http://ns.adobe.com/xap/1.0/ <?xpacket begin=' ' id='W5M0MpCehiHzreSzNTczkc9d'?> <x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='Image::ExifTool 7.89'> <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'> <rdf:Description rdf:about='' xmlns:photoshop='http://ns.adobe.com/photoshop/1.0/'> <photoshop:Headline>heisannheisann</photoshop:Headline> </rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket end='w'?> -- but the exiv2 tool says: $ exiv2 -p x Vannliljer.jpg Vannliljer.jpg: No XMP data found in the file When i do the same thing on a linux box, I get this: $ exiv2 -p x tmp.jpg Xmp.photoshop.Headline XmpText 14 heisannhei +sann $http://ns.adobe.com/xap/1.0/ <?xpacket begin=' ' id='W5M0MpCehiHzreSzNTczkc9d'?> <x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='Image::ExifTool 7.30'> <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'> <rdf:Description rdf:about='' xmlns:photoshop='http://ns.adobe.com/photoshop/1.0/'> <photoshop:Headline>heisannheisann</photoshop:Headline> </rdf:Description> </rdf:RDF> </x:xmpmeta>
Any more clues? best regards. Kjell


Comment on Re^2: XMP, Image::ExifTool, strawberryperl
Select or Download Code
Re^3: XMP, Image::ExifTool, strawberryperl
by snoopy (Deacon) on Nov 27, 2009 at 06:33 UTC
    Thanks for the extra information.

    Just to point out that one obvious difference is that the linux box is running Image::ExifTool version 7.30, whilst windows is running a more recent 7.89. This is a possible factor.

    You could experimentally try backing out your Windows version using Image::ExifTool 7.30 from backpan, just to confirm this, or rule it out.

      That is a good tip. I will try to reproduce with 7.30. Other differences I have found:
      1. Block start with different chars:: Linux: HEX ASCII FF E1 0B 24 .$ Win: FF E1 0B 25 .% 2. After the slash in "/xap/1.0/ - And before the tag <?xpacket I have this: Linux: - HEX - - ASCII - 2F 00 3C - /.< Win: 2F 20 00 3C - / .< When I change 20 to 00 in a hexeditor, i get this: $ exiv2 -p x fromwin.jpg XMP Toolkit error 201: XML parsing failure Warning: Failed to decode XMP metadata. fromwin.jpg: No XMP data found in the file
      Strange. Ill get back with testresult on 7.30. It would be intresting if this bug/feature is reproducable on other systems.
        There may be some differences due to exiftool version when you diff the 2 files, but I know of no problems with version 7.30 that could cause this. Could you send me the two images so I can take a look? My email is phil at owl.phy.queensu.ca Thanks. - Phil
Re^3: XMP, Image::ExifTool, strawberryperl
by mrkjell (Initiate) on Nov 27, 2009 at 18:57 UTC
    Some more debugging discovered some embarrassing things.
    Being so focused on the borked metadata, I did not realize that the image also got resized using Image::Magick. I gues the problem is not Image::ExifTool after all. Ill gues I now suspect Image::Magick :)
    Thank you for all you help so far.
    Best regards.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://809648]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2014-10-23 12:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (125 votes), past polls