Is it possible to use two values in one column, but not the same time - I have a column Quality and wants to use -PhotoshopQuality and -Quality that is, if there is no value PhotoshopQuality let it display Ducky quality.
Yes. You can do this by creating a user-defined Composite tag which is based on PhotoshopQuality and Quality. The ValueConv for this tag would be simple:
ValueConv => '$val[0] || $val[1]',
See the sample config file (https://exiftool.org/config.html) for documentation and examples of user-defined tags.
- Phil
Thanks Phil - but not what I continue to do with it, insert this file into the folder ExifToolGUI?
Can anyone help me - I really do not like to use it, still learning ExifTool.
Did you read the instructions starting with "To activate this file,..." in the comments of the sample config file I linked?
- Phil
OK, I changed the name to ".ExifTool_config" and put the file in the folder ExifTool - what next?
You're supposed to put it in your home directory.
Then edit the file to add a definition like this to the Composite tags section:
MyQuality => {
Require => {
0 => 'PhotoshopQuality',
1 => 'Quality',
},
ValueConv => '$val[0] || $val[0]',
},
Then use "MyQuality" in ExifToolGUI.
- Phil
Unfortunately, it does not work - I put the file ".ExifTool_config" in the C:\Windows and changed a sample entry to the specified by you. Then in ExifToolGUI I entered "MyQuality" or "-MyQuality" without the quotes, and does not work.
Not in C:\Windows. I said in your home directory. (Something like "C:\Documents and Settings\USERNAME" or something, depending on what Windows version you are running.)
- Phil
It also does not work - I put the file in "C:\Documents and Settings\Michał"
OK. Try this from the command line to see what happens and if it gives any errors:
exiftool -myquality -quality -photoshopquality FILE
- Phil
Done:
C:\Documents and Settings\Michał>exiftool -myquality -quality -photoshopquality
"C:\Documents and Settings\Michał\Moje dokumenty\Moje obrazy\351001.jpg"
Unterminated <> operator at C:\Documents and Settings\Micha│/.ExifTool_config li
ne 347.
Photoshop Quality : 6
C:\Documents and Settings\Michał>exiftool -myquality -quality -photoshopquality
"C:\Documents and Settings\Michał\Moje dokumenty\Pobieranie\lol012IGD_145316017.
jpg"
Unterminated <> operator at C:\Documents and Settings\Micha│/.ExifTool_config li
ne 347.
Quality : 66%
Ah. You had this at the bottom on the file:
<-- Back to ExifTool home page
The attached config file should work for you (I also fixed an error of mine: "Require" should have been "Desire" for the new tag).
(Note: you'll have to rename the config file to ".ExifTool_config" -- also, remove any old versions you have lying around in C:\Windows, etc)
- Phil
I noticed a difference in the codes that you provided:
1. ValueConv => '$val[0] || $val[1]',
2.MyQuality => {
Require => {
0 => 'PhotoshopQuality',
1 => 'Quality',
},
ValueConv => '$val[0] || $val[0]',
},
perhaps by it does not work?
Oops. You're right. Here is a fixed version.
- Phil
Apparently well, but in the column PhotoshopQuality have a value of 10 in a MyQuality 6 - and instead of 66% is 66
I don't understand what you want, but you can do mathematical manipulations in the ValueConv statement if necessary.
- Phil
What I mean is that: if there is no value -PhotoshopQuality is that the column was not empty, let's display the value of the tag -quality - and now it is almost: but the real value -PhotoshopQuality is reduced by 4 in column MyQuality
real value: 10 now 6 should be displayed 10
real value: 6 now 2 should be displayed 6
and does not display % sign for Ducky quality via ".ExifTool_config"
the only thing that is good: value NORMAL for Nikon quality
And in ExifToolGUI I can not use "-*Quality" to solve a problem or a separator (sign or) -PhotoshopQuality | -Quality
Ah, I see. There were print conversions for these tags that you want to keep. Try changing the ValueConv to this:
ValueConv => '$prt[0] || $prt[1]',
- Phil
That's exactly what it was! Thanks Phil!
if only this line is important?
MyQuality => {
Desire => {
0 => 'PhotoshopQuality',
1 => 'Quality',
},
ValueConv => '$prt[0] || $prt[1]',
},
I wanted to delete the remaining entries - unless it does not affect the speed of reading the data.
Can I use this file to see all the 'Unknown tags"?
Quote from: pedro22 on February 03, 2017, 10:52:55 AM
That's exactly what it was! Thanks Phil!
Great.
Quoteif only this line is important?
yes.
QuoteI wanted to delete the remaining entries - unless it does not affect the speed of reading the data.
I don't know what you mean. Do you mean remove the other columns in ExifToolGUI? I don't know about this.
QuoteCan I use this file to see all the 'Unknown tags"?
The config file doesn't help with that, but the GUI should have an option to show unknown tags (equivalent to the
-u option on the command line).
- Phil
Quote from: Phil Harvey on February 03, 2017, 11:24:08 AM
Quote from: pedro22 on February 03, 2017, 10:52:55 AM
I wanted to delete the remaining entries - unless it does not affect the speed of reading the data.
I don't know what you mean. Do you mean remove the other columns in ExifToolGUI? I don't know about this.
I mean the other lines in ".ExifTool_config" or affect the performance ExifTool or ExifToolGUI because I noticed that the ET reads much more tags especially in the Composite
or whether to leave in ".ExifTool_config" this one line and it will work.
Ah, I see. Here is the minimal config file:
%Image::ExifTool::UserDefined = (
'Image::ExifTool::Composite' => {
MyQuality => {
Desire => {
0 => 'PhotoshopQuality',
1 => 'Quality',
},
ValueConv => '$prt[0] || $prt[1]',
},
},
);
1; #end
- Phil
Many Thanks Phil!
A fantastic tool!
One more thing I have learned a little, but as I wanted to in the future to add other tags such a function where? - Or rather in which place.
Do these lines have to be repeated:
%Image::ExifTool::UserDefined = (
'Image::ExifTool::Composite' => {
or insert almost the same after the line:
ValueConv => '$prt[0] || $prt[1]',
Your question should be answered by looking at the sample config file.
- Phil