Adding EXIF data to scanned JPEGs

Started by drmiller, April 29, 2011, 05:06:14 PM

Previous topic - Next topic

drmiller

I'm not a PERL or command line person, but I sense exiftool is powerful enough to do about anything (if you know how).

My ultimate goal is to add EXIF date data (manually, both original date and file creation date) to match the printed-on-the-picture date stamps on JPEGs that resulted from machine scanning of hundreds of paper pictures (e.g. 4x6s scanned at 300dpi).

But most EXIF editors I've found require the EXIF data already be present and there are not in these scanned files (pictures from digital cameras are easy). Ideally, I'd like to do this with a Mac.

So, is there a way with EXIF to 1) add empty (or stand-in) EXIF data to JPEGs in a batch, 2) does this require the image file to be recompressed and thus affect picture quality (and is there a way to control the JPG quality), and 3) could someone hint at how any of this would be accomplished with a command line instructions?

Thanks!

Thanks for any direction

drmiller

I'm sorry, I posted almost the exact question here 8 months ago (https://exiftool.org/forum/index.php/topic,2867.msg12685.html#msg12685), BUT I still have the question about the image quality after the EXIF data is added. Does it change?

And although I have not tried any Mac programming at this point, can EXIFtool be used in Objective-C programs (I don't understand how since it is a PERL library) and what are the licensing issues?

Alan Clifford

Quote from: drmiller on April 29, 2011, 05:06:14 PM

But most EXIF editors I've found require the EXIF data already be present and there are not in these scanned files (pictures from digital cameras are easy). Ideally, I'd like to do this with a Mac.


exiftool -datetimeoriginal='2011:02:17 03:52:28' paris00019.jpeg

does it for me on a Mac with that scanned file.

I'd suggest that it's always best to do it anything on copies rather than on unrecoverable originals.  Storage space is quite cheap nowadays.

Alan


Phil Harvey

ExifTool does not modify (or recompress) the image, so it is lossless as far as image quality is concerned.

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

drmiller

That's great (lossless)! Thanks.

But what about licensing and use in 3rd party apps (e.g. Objective-C)?

Do you know of Objective-C/C frameworks that do the same work as exiftool (if it cannot be used)?

Phil Harvey

You must exec the exiftool from within an objective C routine.  There may be an example of this in the Programming resources on the ExifTool home page.

The license is the Perl artistic license, which allows embedding in other applications with some minor restrictions.

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