scripts/graphics/README.md

59 lines
2.3 KiB
Markdown
Raw Normal View History

apply-exif-orientation.sh
=========================
`apply-exif-orientation.sh` retrieves the Orientation EXIF tag from an image
file and rotates the actual image data according to the said orientation. The
EXIF Orientation tag is deleted in the process. The goal is to allow the image
to be displayed correctly by tools that don't handle EXIF metadata (such as
ImageMagick's display).
EXIF information is manipulated using exiftool, shipped with the
`Image::ExifTool` Perl module (Debian package: `libimage-exiftool-perl`).
Image is rotated using ImageMagick's `convert`.
**Warning**: no backup of the original file is made!
2017-09-23 05:30:51 +02:00
tiff-batch-convert.sh
===============
`tiff-batch-convert.sh` converts TIFF images to another format of your choice,
such as JPEG.
Use case: you have a bunch of albums that you scanned to TIFF to preserve
quality, with a good resolution, each album being in its own directory. But
TIFFs are big; you want to generate compressed versions of the albums, possibly
down-scalling the images, to share on the Internet or copy them to your
smartphone.
Usage:
tiff-batch-convert.sh <DESTINATION> <ALBUM1> [ALBUM2 [...]]
`<DESTINATION>` is the base directory in which the converted albums will be
stored; each album will be in a separate sub-folder
For example, this will convert every album under
`$HOME/Pictures/my_albums_tiff` and store the result under
`/mnt/usb0/my_albums_lowres` (supposedly a USB drive):
tiff-batch-convert.sh /mnt/usb0/my_albums_lowres $HOME/Pictures/my_albums_tiff/*
Limitations and bugs:
- Existing destination files will be **OVERWRITEN WITHOUT WARNING**!
- Input files must have the extention `.tiff` (lowercase), not `.tif`.
- The albums provided on the command-line must contain TIFF images directly;
sub-folders won't be searched.
- Similarly, the full hierarchy of the input albums is *not* preserved: each
album will be generated as a subfolder of `<DESTINATION>`, even if the
original albums are stored in different places. It is easy to modify this
behaviour in the script if needed.
- To change the quality settings or the output format, you will have to edit
the script (see the `USER CONFIGURATION` section of the script).
Dependencies:
- `convert` from ImageMagick (pkgsrc: ImageMagick, Debian: imagemagick)
- `tiffinfo` from libtiff (pkgsrc: tiff, Debian: libtiff-tools)