documentation/readme.txt
author František Kučera <franta-hg@frantovo.cz>
Mon, 17 Nov 2014 23:39:40 +0100
changeset 20 4e4ad30c17d4
parent 0 454b46a3c68a
permissions -rw-r--r--
documentation – readme
     1 copy-image-resizer
     2 ------------------
     3 
     4 An CLI tool written in Java for resizing images.
     5 Recursively transfers a tree of files and directories and resizes images. 
     6 
     7 
     8 Why?
     9 ----
    10 
    11 If you have fully-fledged operating system like some GNU/Linux distribution,
    12 you will probably use better tool for resizing images.
    13 In Debian or Ubuntu you can easilly install ImageMagick:
    14 	apt install imagemagick
    15 and resize images:
    16 	convert ${input} -resize 1200x1200 -quality 80 ${output};
    17 or write some shell script around it.
    18 
    19 But if you need a multiplatform tool with minimal requirements,
    20 the copy-image-resizer might be useful.
    21 
    22 
    23 Instalation
    24 -----------
    25 
    26 cd java/copy-image-resizer/
    27 ant
    28 
    29 compiled program is in: dist/copy-image-resizer.jar
    30 
    31 you can run it directly:
    32 	java -jar dist/copy-image-resizer.jar
    33 or install it somewhere and run through th wrapper script:
    34 	scripts/copy-image-resizer.sh
    35 (link it somewhere on your $PATH as „copy-image-resizer“)
    36 
    37 TODO: .rpm and .deb packages
    38 
    39 Usage
    40 -----
    41 
    42 copy-image-resizer supports these options:
    43 
    44 --input-dir                 (mandatory)
    45 	one parameter: path to the input directory
    46 
    47 --output-dir                (mandatory)
    48 	one parameter: path to the output directory
    49 
    50 --size                      (mandatory, can be used multiple times to generate multiple resolutions)
    51 	1. parameter: width          (integer)
    52 	2. parameter: height         (integer)
    53 	3. parameter: resizeSmaller  (boolean)    whether smaller images should be also scaled
    54 
    55 --size-named                (alternative to --size)
    56 	1. parameter: width          (integer)
    57 	2. parameter: height         (integer)
    58 	3. parameter: resizeSmaller  (boolean)
    59 	4. parameter: directory      (string)     output sub-directory for this resolution (default in --size is WIDTHxHEIGHT e.g. 64x64)
    60 
    61 --skip-errors               (optional, alternative to --skip-errors-silently)
    62 	no parameters
    63 	errors will be just logged and program will fail at the end if any errors
    64 	(default behavior is: fail on first error)
    65 
    66 --skip-errors-silently      (optional, alternative to --skip-errors)
    67 	no parameters
    68 	errors will be just logged and program will report success even if there were any errors
    69 
    70 
    71 
    72 Example:
    73 
    74 copy-image-resizer --input-dir MyPhotos/ --output-dir MyBlog/ --size 800 600 false --size 1600 1200 false --size-named 300 300 false thumnails
    75 
    76 Will generate three output resolutions in separate directories: „MyBlog/800x600“, „MyBlog/1600x1200“ and „MyBlog/thumbnails“
    77 
    78