These are mainly tasks I do with my scanned files.
By using ImageMagick files can remain 48bits and preserve embedded ICC profiles. Note though that EXIF requires special care in some file formats (like TIFF).
EXIF can store both the time of capture/shot (DateTimeOriginal
) and the time of digitalisation (DateTimeDigitized
).
This uses the file modification date as the time of digitalisation. Will only remain correct if the file has not been modified (i.e. do this first) [Unix command-line]:
$ exiftool -P -overwrite_original -DateTimeDigitized=$(stat -c %y "FILE.TIF" | cut -d. -f1 |sed 's/-/:/g') FILE.TIF
Script:
#!/bin/bash IN="$1" [ "$IN" ] || exit 1 DateDig=$(stat -c %y "$IN" | cut -d. -f1 |sed 's/-/:/g') exiftool -P -overwrite_original -DateTimeDigitized="$DateDig" "$IN"
ZIP compression is not supported by all programs but better than the more common LZW:
$ convert FILE.TIF -alpha off -compress zip -quality 100 FILE2.TIF
This discards any EXIF data! See below for how to copy it.
Note -quality
here doesn't actually affect quality since this operation is lossless, but it increases the compression level slightly.
''-alpha off' drops the alpha channel (transparency) if there's one. Unedited scans shouldn't contain an alpha channel but this will depend on the programs involved. If present, dropping it will further reduce the filesize.
$ exiftool -P -overwrite_original -TagsFromFile SOURCE.TIF DEST.TIF
$ convert SOURCE.TIF -negate DEST.TIF
My workflow with EPSON Scan is: