You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Matteo Cypriani 8170f37c7a [graphics] shellcheck bypass 6 years ago
.. tiff-batch-convert: quality is now an argument 6 years ago Split multimedia into audio and graphics 6 years ago [graphics] shellcheck bypass 6 years ago 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! 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.


impacts the resolution of the converted pictures; it can be "low", "medium" or "high". Use "high" for no rescaling. The actual size of the pictures for "low" and "medium" is hard-coded in the script (see "Limitations and bugs" below).

<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): /mnt/usb0/my_albums_lowres $HOME/Pictures/my_albums_tiff/*

Limitations and bugs:

  • Existing destination files will be OVERWRITTEN 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 output format or the size of the generated pictures (for "low" and "medium" quality settings), you will have to edit the script (see the "USER CONFIGURATION" section of the script).


  • convert from ImageMagick (pkgsrc: ImageMagick, Debian: imagemagick)
  • tiffinfo from libtiff (pkgsrc: tiff, Debian: libtiff-tools)