I would like to change Megapixels to be displayed in the thousandths rather than tenths. How can I do that? (I don't mean by adding the -n switch, I mean permanently somewhere so the command doesn't need to change.)
Example, Megapixels = 1.234 instead of 1.2
Thanks in advance for your support! I hope you are well.
- J
Here's a short config file to do this. Copy the stuff between Cut/Paste if you want to add it to your .exiftool_config It will create a new tag called MyMegapixels
%Image::ExifTool::UserDefined = (
'Image::ExifTool::Composite' => {
#-------------------------------- Cut
MyMegapixels => {
Require => 'Megapixels' ,
ValueConv => '$val = sprintf("%.3f",$val)',
},
},
#-------------------------------- Paste
);
#-
1; #end
You are incredibly generous with your time and knowledge. Thank you! Deep bow. - J
I had to edit the code slightly to make it work, and I thought I'd leave it here in case it is helpful to anyone else in the future:
MyMegapixels => {
Require => {
0 => 'Megapixels',
},
ValueConv => '$val = sprintf("%.3f",$val)',
},