I am about to receive 1000+ files that will need to be renamed so the names contain their print dimensions. I've figured out how to extract the pixel dimensions and rename the files to include that with exiftool but I'm not sure what the best approach is for automating the pixels to inches calculation and subsequent renaming.
This is what exiftool is doing:
exiftool '-filename<%f_h${ImageHeight}w${ImageWidth}r${XResolution}.${FileType}'
So the original file name of 466001004_cc.jpg
gets renamed to 466001004_cc_h5280w4080r120.jpg
and now I need to divide 5280
and 4080
by 120
to get the inch values.
Ultimately the file name should look like this: 466001004_cc_044x034.jpg
Any help would be greatly appreciated, thanks!