After changing jpeg size ...

Started by Alan Clifford, December 20, 2018, 04:41:41 PM

Previous topic - Next topic

Alan Clifford

I am currently revisiting my old script for changing photo sizes and rotation.  After the process, I am left with:

[EXIF:ExifIFD]  Exif Image Width                : 3616
[EXIF:ExifIFD]  Exif Image Height               : 2712
[File]          Image Width                     : 1024
[File]          Image Height                    : 768


If I've rotated, I revise the orientation tag.

Should I be revising the Exifimagewidth and Exifimage height tags?  Not changing them doesn't seem to have caused any problems over the last few years.  And should any other tags be updated?

Phil Harvey

Updating those is a good idea, but honestly, since they are redundant and non-authoritative, most apps probably ignore them anyway.  But if not changed the provide a clue that the image was resized.  Technically, the ModifyDate tag should be changed too.  I can't think of anything else offhand.

- Phil
...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 ($).

Alan Clifford

Thanks Phil.

Next stuff I am checking for my new process:

From my original file, I create a processed file with xmp, iptc and exif gps stuff.  From this I create the small file with water mark for my website.  In this process, xmp, iptc, gps and exif water depth are destroyed.  ImageMagick's mogrify is responsible according to my notes. With a file from my new camera, MPF has gone as well but I don't think I want that.

In my old script, I ran
exiftool -overwrite_original_in_place -tagsfromfile processedfile -all:all websitefile

I have a comment "#  Use exiftool to copy in all the tags from the original but not unsafe tags" but I'd like to confirm if this is an OK thing to do.

After running this,  MPF is still missing but I don't think I need that stuff.

"[Photoshop]     IPTC Digest" is missing but probably not important
"[IPTC]          Coded Character Set             : UTF8" is missing.

I have my own xmp tag, "[XMP] UW Depth : 14.9".  So a question specifically for Phil.  Would you have expected that to have been copied over? Its definition is in ~/Exiftool_config


Phil Harvey

Quote from: Alan Clifford on December 21, 2018, 05:26:10 AM
I have a comment "#  Use exiftool to copy in all the tags from the original but not unsafe tags" but I'd like to confirm if this is an OK thing to do.

Sounds reasonable.

QuoteI have my own xmp tag, "[XMP] UW Depth : 14.9".  So a question specifically for Phil.  Would you have expected that to have been copied over? Its definition is in ~/Exiftool_config

You mean ~/.ExifTool_config?  If so, then it should be copied as long as you have made the tag writable.

- Phil
...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 ($).

Alan Clifford

Quote from: Phil Harvey on December 21, 2018, 07:10:56 AM

You mean ~/.ExifTool_config?  If so, then it should be copied as long as you have made the tag writable.

- Phil

No I didn't.  Sorry, very careless of me.  I set the tag using Perl and there is a .ExifTool_config in my ~/bin directory.  Symlinked to it and problem solved.  Thanks.