Restoring pixel dimensions

Started by Archive, May 12, 2010, 08:54:20 AM

Previous topic - Next topic

Archive

[Originally posted by philipgoddard on 2008-05-28 19:02:46-07]

I recently edited some new photos with PhotoPlus 12, which kindly wiped out all metadata for them apart from date/time.  Most of that data I don't need, but there are two exceptions, one of which I've already managed to restore.  I just used ExifTool with ExifToolGUI to write back the camera make and model, but still need to get the pixel dimensions written back, and they are different for each of the edited photos because they got cropped to different sizes in the editor.  Unfortunately ExifToolGUI doesn't enable one to write to the PixelXDimension and PixelYDimension tags, and in any case what I really want is ExifTool to use the actual current image dimensions in pixels and record them in those Pixel Dimension tags.

So, my big question is, could I do the latter with ExifTool, and if so, what would be the syntax to use?  That is, to directly read the pixel dimensions and transfer that data to the relevant tags. Many thanks.

Kind regards,

Philip Goddard,

http://www.clear-mind-photos.com" target="_blank">Clear Mind Photos

Archive

[Originally posted by exiftool on 2008-05-28 19:24:21-07]

Hi Philip,

I think you want to do this:

Code:
exiftool "-ExifImageWidth<ImageWidth" "-ExifImageHeight<ImageHeight" DIR

(The tags called PixelXDimension/PixelYDimension by the EXIF specification
are named ExifImageWidth/ExifImageHeight by exiftool.)

- Phil

Archive

[Originally posted by philipgoddard on 2008-05-29 07:50:02-07]

Wow, thank you!  Just done it, and it worked! All my photos have their correct dimensions entered again. Much appreciated.

I've now got that function set up as a shortcut for drag-and drop of files or folders onto it in case of any future such mishaps.

Kind regards,

Philip Goddard.