Create Exif height/width tags from image data?

Started by bob, November 02, 2018, 08:40:05 AM

Previous topic - Next topic

bob

I'm sure I should have been able to figure this out, but I'm a bit lost and not particularly adept with code, so I apologize.

The operation I want to do on my photos is very simple (at least it seems like it should be):

I want to create ExifImageHeight and ExifImageWidth tags based on each file's ImageHeight and ImageWidth.

I feel like it should be as simple as

exiftool -exifimageheight=imageheight -exifimagewidth=imagewidth image.jpg

but that obviously doesn't work.

Is there a way to reference a picture's imageheight / imagewidth within a single command or do I need to make a batch file or go way down the rabbit hole on this?

Thanks

Phil Harvey

...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

bob