ImageMetaData (set/edit EXIF/IPTC/XMP-metadata and Comment of image files by Exiv2 lib) content plugin

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: sheep, Hacker, Stefan2, white

Post Reply
User avatar
Peter
Power Member
Power Member
Posts: 1985
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz

Re: German Umlaute

Post by *Peter »

tbeu wrote:...If you run exiftool from command line with -L option (= Latin1 character set) the entries are corretly displayed. But not in command window which has problems with encodings.
I tested it with current version 8.7.7 with "-L" and get other strings, but
- not the German Umlaute and
- Copyright and Caption still different.

After setting both entries with XnView I got same results for all entries.

So this is a must:
tbeu wrote:If you use ft_string option instead of ft_stringw option in jpg-comment.ini for "Caption" and "Copyright" XnView displays them correctly, too.

Code: Select all

074=8|Caption|Iptc.Application2.Caption
076=8|Copyright|Iptc.Application2.Copyright
Two other questions:
- There is no jpg-comment.ini in the download-package. Is is created the first time the plugin starts?
- How important are the number of the lines (074, 076, ..) in jpg-comment.ini?

Thanks

Peter
TC 9.51 / #266191
Win 10 x64
User avatar
tbeu
Power Member
Power Member
Posts: 1301
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Re: German Umlaute

Post by *tbeu »

Peter wrote:So this is a must.
Yes, but only for XnView. Anyway, I will change the entries from ft_stringw to ft_string for default jpg-comment.ini just because of XnView. Can you please also check with IrfanView for both variants?
Peter wrote:There is no jpg-comment.ini in the download-package. Is is created the first time the plugin starts?
jpg-comment.ini is part of the source package and compiled as resource. It is created the first time the plugin starts and no valid jpg-comment.ini is found.
Peter wrote:How important are the number of the lines (074, 076, ..) in jpg-comment.ini?
Numbers are ignored. Any string is possible.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
User avatar
Peter
Power Member
Power Member
Posts: 1985
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz

Re: German Umlaute

Post by *Peter »

tbeu wrote:...Can you please also check with IrfanView for both variants?...
Sorry, I don't have IrfanView. But as said above - ExifTool(GUI) displays the same as XnView. But maybe this increases my level of knowledge.
tbeu wrote:Numbers are ignored. Any string is possible.
So all the numbers "075=..." are only for the user?

Here is my current lng-section. As discussed above there are similiar entries like "Country N ame" and "CountryName". I used the same words for these entries, but added an underline at the end ("Land_") to avoid double definition. I don't think that this is a great idea but at the moment it works

Code: Select all

[deu]
Artist=Künstler
Byline Title=Titel des Inhaltserstellers
Byline=Inhaltsersteller
BylineTitle=Titel des Inhaltserstellers_
Caption Writer=Titelautor
Caption=Titel
Category=Kategorie
City=Stadt
Contact=Kontakt
Country Name=Land
CountryCode=Ländercode
CountryName=Land_
Creation Date=Erstellungsdatum
Creation Time=Erstellungszeit
Credits=Danksagungen
Date Time Digitized=Datum (digitalisiert)
Date Time Original=Datum (original)
Date Time=Datum
DateCreated=Erstellungsdatum_
Document Name=Dokumentenname
Edit Status=Bearbeitungsstatus
EditStatus=Bearbeitungsstatus_
Fixture Id=Job-Id
FixtureId=Job-Id_
Headline=Überschrift
Image Description=Bildbeschreibung
ImageType=Bildtyp
JPG Comment Complete=JPG-Kommentar komplett
JPG Comment Line=JPG-Kommentar Zeile
Keywords=Stichworte
Location Name=Adresse
LocationName=Adresse_
Object Name=Objektname
ObjectName=Objektname_
Province/State=Staat/Provinz
ProvinceState=Staat/Provinz_
Rating=Bewertung
RecordVersion=Aufnahmeversion
Software=Software
Source=Quelle
Special Instructions=Spezielle Anweisungen
SpecialInstructions=Spezielle Anweisungen_
Subject=Thema
Sublocation=Stadtbereich
SubSec Time Digitized=Sekundenbruchteil (digitalisiert)
SubSec Time Original=Sekundenbruchteil (original)
SubSec Time=Sekundenbruchteil_
SuppCategory=Zusatzkategorien_
Supplemental Categories=Zusatzkategorien
TimeCreated=Erstellungszeit_
Transmission Reference=Originale Übertragungsreferenz
TransmissionReference=Originale Übertragungsreferenz_
Urgency=Priorität
User Comment=Benutzerkommentare
Writer=Verfasser
Peter
TC 9.51 / #266191
Win 10 x64
User avatar
tbeu
Power Member
Power Member
Posts: 1301
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Re: German Umlaute

Post by *tbeu »

Peter wrote:Sorry, I don't have IrfanView.
But I suppose IrfanView has no problem with IPTC encodings.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
User avatar
Peter
Power Member
Power Member
Posts: 1985
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz

Re: German Umlaute

Post by *Peter »

tbeu wrote:...Yes, but only for XnView. Anyway, I will change the entries from ft_stringw to ft_string for default jpg-comment.ini just because of XnView. Can you please also check with IrfanView for both variants?....
Author of XnView says that Photoshop and Zoner Photo Studio do the same as XnView does:
newsgroup.xnview.com/viewtopic.php?f=36&t=24982&p=101017#p101017

But for me I will stop this special point of that thread. Tbeu found a solution for me, it works and that is fine. The knowledge of this thing is to high for me as dummy-user.

Peter
TC 9.51 / #266191
Win 10 x64
User avatar
tbeu
Power Member
Power Member
Posts: 1301
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu »

I remembered some old conversation with developer of Exiv2 when I asked for IPTC encoding. He told me that the character set is defined by the Iptc.Envelope.CharacterSet tag which however is often missing. Then all that can be done is to guess encoding like recommended by MWG in http://www.metadataworkinggroup.com/pdf/mwg_guidance.pdf, page 31.

Thus the default jpg-comment.ini was wrong having both ft_string and ft_stringw data types that are handled differently by the plugin. Currently ft_string uses default code page for reading/writing whereas ft_stringw assums UTF-8 (even if Iptc.Envelope.CharacterSet does not state UTF-8). I am going to fix both issues.

Please check FAQ 10 of exiftool http://www.sno.phy.queensu.ca/~phil/exiftool/faq.html#Q10 how exiftool handles IPTC encodings. Thus you can see how to use charset iptc option to define the used IPTC character set.

I believe that UTF-8 encoding for IPTC is not supported by XnView. Only default code page is used.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
User avatar
Peter
Power Member
Power Member
Posts: 1985
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz

Post by *Peter »

Thanks Thomas for the clarification. As said above I am content with the fixes you promised.

Greetings

Peter
TC 9.51 / #266191
Win 10 x64
Hakker
Junior Member
Junior Member
Posts: 23
Joined: 2009-03-01, 14:48 UTC

Post by *Hakker »

I used an older plugin first to get resolution data of images like width, height and color depth however since that one isn't updated anymore ImgSize and I transfered to x64 I found your plugin. However for some reason it finds the resolution only partly. Sometimes it can get them other times it doesn't get it.

Is it possible to add an option that it can get that data more reliable? Not every image comes from an camera for instance so that might be a part of the problem.
User avatar
tbeu
Power Member
Power Member
Posts: 1301
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu »

Hakker wrote:Not every image comes from an camera for instance so that might be a part of the problem.
Plugin is mainly suitable for images storing metadata inside.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
User avatar
Peter
Power Member
Power Member
Posts: 1985
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz

Post by *Peter »

The plugin offers different entries for "resolution". Did you try all of them?

Peter
TC 9.51 / #266191
Win 10 x64
Hakker
Junior Member
Junior Member
Posts: 23
Joined: 2009-03-01, 14:48 UTC

Post by *Hakker »

Peter wrote:The plugin offers different entries for "resolution". Did you try all of them?

Peter
Well all I could find actually. Exif x64 does the same. so it doesn't solve the issue and those are the only 2 that has any image functions. Somehow it differs from Image Info and or imgsize plugins.

And yes I know both a more geared towards images mainly coming from digital camera's but I also use it for sorting out wallpapers for a site I run.

The Xresolution & Yresolution functions gets the dpi from it excluding 4 functions and the PixelXDimension and PixelYDimension functions totalling the other 4 are hits and misses.

If I knew a bit of coding I would have tried to covert ImgSize or Image Info myself to x64 to get it working in the end but I'm horrible at it. Yes I tried it and I even made some half baked stuff in Turbo C and Assembly back a long time ago but that was pain sweat and tears for what would be considered very simple stuff.
mariasaleem
New Member
New Member
Posts: 1
Joined: 2012-04-19, 12:20 UTC

Post by *mariasaleem »

Nice work peter, :D
User avatar
tbeu
Power Member
Power Member
Posts: 1301
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

ImageMetaData plugin 2.3.2.0

Post by *tbeu »

Plugin Version 2.3.2.0 is released:
• replaced Exiv2 library 0.22 (r2643) by 0.23 (r2749)
• replaced Expat 2.0.1 by Expat 2.1.0
• replaced zlib library 1.2.5 by 1.2.7
• fixed trailing wide string conversion for ft_numeric_floating fields
• fixed: trailing wide string for ft_numeric_floating fields displays max. 5 decimal places
• fixed code page issues for reading/writing metadata
• fixed run-time exception when writing an empty/invalid time/date format
• renamed/shortened and resorted all strings in default jpg-comment.ini (breaking compatibility)
• set ShowErrors in default jpg-comment.ini to off
• added CodePage option to section [Settings] of jpg-comment.ini,i.e.

Code: Select all

[Settings]
CodePage=0
sets the code page to system default Windows ANSI code page

Download Version 2.3.2.0: ReadMe, Plugin (x86/x86-64), C++ Sources (to do)
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
User avatar
tbeu
Power Member
Power Member
Posts: 1301
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

ImageMetaData plugin 2.3.3.0

Post by *tbeu »

Plugin Version 2.3.3.0 is released:
• fixed access violations for invalid string conversions
• removed CodePage option from section [Settings] of jpg-comment.ini
• added JPEG_CodePage, EXIF_CodePage, IPTC_CodePage and XMP_CodePage options to section [Settings] of jpg-comment.ini, i.e.

Code: Select all

[Settings]
JPEG_CodePage=0
EXIF_CodePage=65001
IPTC_CodePage=0
XMP_CodePage=65001
Download Version 2.3.3.0: ReadMe, Plugin (x86/x86-64), C++ Sources
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
User avatar
tbeu
Power Member
Power Member
Posts: 1301
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

ImageMetaData plugin 2.3.4.1

Post by *tbeu »

Plugin Version 2.3.4.1 is released:
• replaced Exiv2 library 0.23 (r2749) by 0.23 (r2895)
• fixed Exif date stamp: forward slash (besides colon) is also allowed as separator
• added experimental support of metadata dump as full text fields, to enable add the new dump fields at the end of section [Metadata] of jpg-comment.ini,i.e.

Code: Select all

[Metadata]
...
; Experimental dump
EXIF_Dump=9|ExifDump|Exif.Dump
IPTC_Dump=9|IptcDump|Iptc.Dump
XMP_Dump=9|XmpDump|Xmp.Dump
Download Version 2.3.4.1: ReadMe, Plugin (x86/x86-64), C++ Sources
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
Post Reply