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: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Sombra
Power Member
Power Member
Posts: 811
Joined: 2005-12-27, 22:23 UTC
Location: Zaragoza, Spain

Post by *Sombra »

Hello tbeu,
Is a multiple choice field allowing values from 1 to 8 alright for you?
I think that that would be enough, in this way all possible combinations of the EXIF orientation are covered.
This could be useful, even for locate, select pictures, etc with certain attribute.

Thanks for considering. :)
I can read English, but... I write like Tarzan. (sorry)
User avatar
tbeu
Power Member
Power Member
Posts: 1336
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu »

There is now a generic Exiv2 interface, i.e. virtually any metadata can be displayed and edited. Please uncomment the appropriate field line in file jpg-comment.ini to also incorporate the orientation metadata.

Download Vs 2.2.0.1: ReadMe, Plugin, Source (C++)
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
Sombra
Power Member
Power Member
Posts: 811
Joined: 2005-12-27, 22:23 UTC
Location: Zaragoza, Spain

Post by *Sombra »

Hello tbeu!
Thank you so much, for this improvement added to your plugin. :)

I have been playing a bit with it, seems works fine under Windows XP SP3. The tests were done with different pictures taken from different cameras Nikon, HP and with JPG files without any metadata. All apparently successfully changing the tag for exif orientation, also for find pictures with a determinate tag orientation.

A little problem that only happens in Windows Vista home premium 32bit. The next message is shown by TC when I change the tag orientation with your plugin:
---------------------------
C:\Totalcmd\Plugins\wdx\jpg-comment\DSCN5265.JPG
---------------------------
Error setting the following attribute:
Orientation

Continue?
---------------------------
Sí No
---------------------------
Anyway the plugin does the operation of change the attributes. These settings were used in Vista.

Regards.
I can read English, but... I write like Tarzan. (sorry)
User avatar
tbeu
Power Member
Power Member
Posts: 1336
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu »

I have no Vista to reproduce, sorry. Maybe it is related to http://ghisler.ch/board/viewtopic.php?p=162798 because you set orientation field twice. I think we should wait for TC 7.5 to see if the error still occurs.
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
Sombra
Power Member
Power Member
Posts: 811
Joined: 2005-12-27, 22:23 UTC
Location: Zaragoza, Spain

Post by *Sombra »

Hi Again,
A little of info: Using only a field for set the exif orientation, the error happened too.

Added:
Hmmmh... The problem seems affect to all fields, not only for the exif orientation and only in windows vista. The previous version 2.1.5 have the same problem. Should I check my system? or... Could somebody confirm, please?
I can read English, but... I write like Tarzan. (sorry)
User avatar
tbeu
Power Member
Power Member
Posts: 1336
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu »

Sombra, can you please check with exiv2.exe Vs. 0.18.1!

[face=courier]exiv2.exe -M "set Exif.Image.Artist Test" file.jpg[/face]
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
Sombra
Power Member
Power Member
Posts: 811
Joined: 2005-12-27, 22:23 UTC
Location: Zaragoza, Spain

Post by *Sombra »

I tried the next commands:
  • exiv2.exe -M "set Exif.Image.Artist Test" DSCN5434.JPG
    exiv2.exe -M "set Exif.Image.Orientation 6" DSCN5434.JPG
Both command worked fine in Windows Vista and XP.

The strange is that TC show the error message, but your plugin change the attributes finely.
I can read English, but... I write like Tarzan. (sorry)
User avatar
tbeu
Power Member
Power Member
Posts: 1336
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu »

When using the plugin what is the time stamp of the file after the field change? Either the original time/date or the current one?
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
Sombra
Power Member
Power Member
Posts: 811
Joined: 2005-12-27, 22:23 UTC
Location: Zaragoza, Spain

Post by *Sombra »

Hello tbeu,
Either the original time/date or the current one?
Creation date/time remain, while that the access date and write date is changed to the current time on my system.

Also happens the next: Selecting SEVERAL pictures and applying the change attribute, TC show the error, then if I select continue, the plugin change the orientation, I can press three or four times "continue" and after these three or four times (randomly) the plugin stop. I have to re-open the change attributes dialog for continue changing the attribute to the rest of pictures selected.
I can read English, but... I write like Tarzan. (sorry)
User avatar
tbeu
Power Member
Power Member
Posts: 1336
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu »

Sorry Sombra, no idea left. Do you have debugging experience using VS 2008?
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
Sombra
Power Member
Power Member
Posts: 811
Joined: 2005-12-27, 22:23 UTC
Location: Zaragoza, Spain

Post by *Sombra »

Do you have debugging experience using VS 2008?
Unfortunately no, sorry.
I can read English, but... I write like Tarzan. (sorry)
User avatar
tbeu
Power Member
Power Member
Posts: 1336
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu »

Is it still reproducable using Beta Vs 2.2.0.2 of the plugin? If so, I am afraid we need some more users to reproduce the erroneous plugin behaviour. Additionally I can also compile a special debug Vs with exception messages for you. Let's see...

Download Vs 2.2.0.2: ReadMe, Plugin, Source (C++)
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: 1336
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu »

I prepared an instrumented Vs 2.2.0.4 of the plugin raising exception messages useful for debugging. I also fixed a potential bug in ContentSetValue() when getting no file access for retrieving the time stamp. Can you please test again!

Download Vs 2.2.0.4: ReadMe, Plugin
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
Sombra
Power Member
Power Member
Posts: 811
Joined: 2005-12-27, 22:23 UTC
Location: Zaragoza, Spain

Post by *Sombra »

Hello tbeu!
Sorry for the late reply.
Is it still reproducable using Beta Vs 2.2.0.2 of the plugin?
Yes, same problem that in previous version.
I prepared an instrumented Vs 2.2.0.4 of the plugin raising exception messages useful for debugging.
Thank you very much for your interest tbeu. I tried this version on Windows Vista home premium SP1. Exception happened, but not many info was shown :( These settings were used in change attributes dialog:
Plugin: jpg-comment ; Property: Exif_Image_Orientation ; Value: right,bottom

Debug error:

Code: Select all

---------------------------
C:\Totalcmd\Plugins\wdx\jpg-comment\DSCN5390.JPG
---------------------------
Error @ CreateFile for reading
---------------------------
Aceptar   
---------------------------
The next... same error que in previous version:

Code: Select all

---------------------------
C:\Totalcmd\Plugins\wdx\jpg-comment\DSCN5390.JPG
---------------------------
Error setting the following attribute:
Exif_Image_Orientation

Continue?
---------------------------
Sí   No   
---------------------------
The difference was that with version 2.2.0.4 the attribute was not applied to the picture. (In previous version, attribute was changed)

2ALL
Could someone confirm this error changing attributes with this plugin under Windows vista? Please.
I can read English, but... I write like Tarzan. (sorry)
User avatar
tbeu
Power Member
Power Member
Posts: 1336
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu »

This debug information is sufficient for me. Now I know which operation failes. It is API function CreateFile (with read access) when the last field is to be set. The error is not in the Exiv library but in the plugin.

I changed for 2.2.0.4 that metadata will not be written to file if CreateFile (with read access) failes. I will rework the file time setting for the next version.

Thank you for testing and debugging!
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