Skip to content

rmw4269/TI-FF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Tenacious Image-File Foreshortener (TI-FF)

This is a Z shell script for replacing all TIFF files in a directory with compressed PNG files that have nearly the same information.

purpose

This utility is intended for use with

usage

usage: ti-ff [ -h | --help | -? ] [<directory>]

This script finds all TIFF files in the current directory (or the provided directory) and converts them all to PNGs using LibTIFF’s tiff2png command. The resulting PNGs are then compressed with OptiPNG. The TIFFs for which this process is successful are deleted. Please note that, by design, this script strips all TIFF and PNG metadata from the output files; however, file access and modification times are copied from the deleted TIFFs to the output PNGs.

dependencies

This script runs only in Z shell (Zsh) and directly relies on the following utilities:

  • LibTIFF’s tiff2png
  • OptiPNG
  • file (with the --mime-type option)
  • touch (with the -r option)
  • printf
  • wc

Starting with an argument of -h, --help, or -? causes this message to be printed to stdout with no further actions.

status codes

  1. success
  2. optional directory argument not found
  3. process interrupted by SIGINT or SIGTERM
  4. failure in at least one file

About

Tenacious Image File Foreshortener

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages