Need help / batch processor / metadata

Started by AnaDia, May 23, 2015, 04:18:10 PM

Previous topic - Next topic

AnaDia

I have some JPG images which I like to mail with just a few metatdata inside. I use the batch processor for adjusting the image resolution and want only the following metadata to be copied from the original files. The original files are developed from RAW files and have all metadata inside.
- Date/Time Original
- Color Space
- Copyright
- Artist

The predefined list doesn't give me the options I need, so I tried "custom metadata" with variables.
Here is one example of my tests:
-ColorSpace={File.MD.Exif::Main\40961\ColorSpace\0}
-DateTimeOriginal={File.MD.Exif::Main\36867\DateTimeOriginal\0} (I know, that there is a format statement missing)
-Artist={File.MD.Exif::Main\315\Artist\0}
-Copyright={File.MD.Exif::Main\33432\Copyright\0}

When I look at the output images, "ColorSpace" shows "uncalibrated", but it should be "sRGB". And "Date/Time Original" shows the same timestamp for all output images. It is the timestamp of the last original image in the list. "Artist" and "Copyright" is filled.
"ColorSpace" and "Date/Time Original" show me, that it is not working like expected.

What am I doing wrong? I would be very happy, if someone can help me solving that issue.

Mario

#1
The only allowed values for color space are 1 (sRGB) and -1 (uncalibrated).
Sometimes ExifTool converts -1 into 65535 and if your variable contains that when ET writes the data it will be skipped and reported as "no print conversion". Please check that.

Any particular reason why you use old EXIF data and not XMP data as the source for the variables? Usually XMP has the better data quality.

Do you only use custom tags or do you copy other groups? I think I recall that custom tags are only allowed with copying at least one of the other tag groups but I need to find a minute to check the code in the Batch Processor.

And the other problem with the 'same values' is also explainable.
The Batch Processor prepares the arguments for the output files once, and then applies them to all files.
Using volatile variables like date and time etc. was not really part of my design.
The emergency feature to set specific tags with specific values was meant to set a specific copyright or maybe a title, but not different values for different files. I'm not sure how complicated it will be to allow that (did not touch the Batch Processor for several months) but maybe you should file a feature request so I don't forget to check it. Posts in 'General Discussion' quickly evaporate from my mind...
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

Hah! Forget it.

I was curious and had a quick look at the metadata processing code. It was actually quite easy to make the processing of variable-driven custom tags to work on a per-file basis. Just some code moving, a smart text replacement and now it works like you thought it should. The variables are evaluated per file and thus you will get different outputs for different inputs.

I count this as a new feature in my book. Version 5.4.12.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

AnaDia

Wow, that's cool! Thank you very much!!!

Relating to "old Exif" versus "XMP". If I remember right, I tried various variables and the showed ones worked. But I will try next with version 5.4.12. Maybe this tests will result in a mixture of copy groups and additional custom tags.

Mario

Using custom metadata tags will also work when no other group/set is enabled for the export in the 5.4.12.

I used

-ColorSpace={File.MD.Exif::Main\40961\ColorSpace\0|replace:65.535==-1}
-DateTimeOriginal={File.MD.Exif::Main\36867\DateTimeOriginal\0|format:YYYY-MM-DD hh:mm:ss}
-Artist={File.MD.Exif::Main\315\Artist\0}
-Copyright={File.MD.Exif::Main\33432\Copyright\0}


for my test.  This matches your setup.
I replace 65.535 explicitly with -1 to produce a value ExifTool understands.
I also take care that the date and time format is in the format expected by ExifTool.,


{File.MD.colorspace|value:formatted}
{File.MD.originaldate|format:YYYY-MM-DD hh:mm:ss}
{File.MD.creator}
{File.MD.rights}


is what I would use. This is based on the standard tags (XMP tags) maintained by IMatch. It still fills the EXIF tag, just the source is the more reliable XMP.

The value:formatted option switches the variable to use the formatted value as delivered by ExifTool and not the default numeric value. In case of -1 (65535) it returns Uncalibrated, else sRGB.  Since this variable is defined as numeric, IMatch uses the RAW value by default and applies the numeric formatted configured for your user account. This means that 65635 becomes 65.536 in the output and thus ExifTool which choke if not manipulated (e.g. via the replace I used above). Switching to the formatted value is more elegant and ExifTool understands his own formatted values also for input.

The YYYY-MM-DD hh:mm:ss format for the datetime is required to switch from the default 'locale-specific' date and time format IMatch uses to the standardized ISO format ExifTool prefers. ExifTool can deal with many different date and time formats, but sometimes the results are unexpected. Better to use always the standard format.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

AnaDia

Ah, "value:formatted" for colorspace! That was the tip I needed for my sRGB problem. Thank you!
So I'm looking forward to version 5.4.12.

AnaDia

Oh, oh, now I found another chapter in the help file, that I hadn't read until now. "Metadata Tag ShortCodes".
Now I completely understand your second version and it works like a charm. And then the new feature for custom tags in the next version - great! Thank you for the help!

Mario

Quote from: AnaDia on May 25, 2015, 11:25:19 PM
Oh, oh, now I found another chapter in the help file, that I hadn't read until now. "Metadata Tag ShortCodes".

Shortcodes are easily overlooked. But very useful. I can only mention them in the help and link to the topic which lists all available 80 short codes.

I've written a short article for the IMatch Knowlege Base on that subject today.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sinus

Quote from: Mario on May 26, 2015, 08:11:34 AM
Quote from: AnaDia on May 25, 2015, 11:25:19 PM
Oh, oh, now I found another chapter in the help file, that I hadn't read until now. "Metadata Tag ShortCodes".

Shortcodes are easily overlooked. But very useful. I can only mention them in the help and link to the topic which lists all available 80 short codes.

I've written a short article for the IMatch Knowlege Base on that subject today.

Thanks for the Knowledge Base, hmmm, your sencence:

The Tag Selector dialog presents these tags in a separate tab, which makes them extra easy to work with.

I must be blind, I do not find this separate tab in the Tag Selector.
Best wishes from Switzerland! :-)
Markus

Mario

The KB article reads:

QuoteIMatch defines a set of standard tags, which include the most frequently used metadata tags from XMP metadata and other formats. The Tag Selector dialog presents these tags in a separate tab, which makes them extra easy to work with.

This sentence talks about standard tags. Each standard tag has an associated shortcode. Standard tags are visible on the 'Standard' tab in the Tag selector. There is no list of the shortcodes in that dialog, if this is what you are looking for. The short codes are listed in the corresponding help topic.

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sinus

I see, Mario,

sorry, so I have misunderstood your sentence.
Anyway, the shortcodes are very helpful!  :)
Best wishes from Switzerland! :-)
Markus

Mario

If you have suggestions on how to improve the wording, let me know.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook