-i and --image


Input: Path

Default None

The absolute path to the image to be crunched.

Example:

$ cruncher -i "C:\path_to_image\the_image.jpg"


-d and --directory


Input: Path

Default Current working directory

The absolute path to the directory of images to be crunched.

Example:

$ cruncher -d "C:\path_to_images_dir"


-o and --output


Input: Path

Default Current working directory/crunched

The absolute path to the directory where crunched images will be placed.

Example:

$ cruncher -o "C:\path_to_output_dir"


-f and --format


Input: String

Default JPEG

The output image format of the final crunched image. Options are currently only JPEG. Support for GIF, JPEG 2000, PNG, and WebP is planned.

Example:

$ cruncher -f PNG


-q and --quality


Input: Integer

Default 80

The quality of the image after it is crunched. May be any integer between 1 and 100.

Example:

$ cruncher -q 75


-s and --size


Input: Integer Integer

Default None None

The pixel width height of the image after it is crunched. This should be two integers with a space between. If none is set, the original image size is used.

Example:

$ cruncher -s 300 200


-a and --append


Input: String

Default None

Append a string to the image filename.

Example:

$ cruncher -a "_thumbnail"


--ignore-orientation


Input: None

Default False

Include this flag to ignore the original image orientation. I.e. if --size is landscape all portrait images will be cropped as landscape.

Example:

$ cruncher --ignore-orientation


-m and --keep-metadata


Input: None

Default False

Include this flag to keep the image meta/exif. Metadata is removed by default.

Example:

$ cruncher -m


-v and --versions


Input: Integer

Default 1

The number of versions to create for each image. If this is set to more than 1 you will be prompted to enter --format, --quality, --size, --append, --ignore-orientation, and --keep-metadata for each version.

Example:

$ cruncher -v 2
Please enter the needed information for each version.
Version 1
Size WIDTH HEIGHT: 200 200
File format: JPEG
Quality: 75
Append filename: _thumbnail
Ignore orientation: False
Keep metadata: False
Version 2
Size WIDTH HEIGHT: 600 400
File format: JPEG
Quality: 75
Append filename: _small
Ignore orientation: True
Keep metadata: False


-r and --recursive


Input: None

Default False

Get images from sub directories also. Only applicable if --directory is used.

Warning: If you use recursive mode multiple times on the same directory make sure your --output directory is not a subdirectory or you will crunch the images you already crunched.

Example:

$ cruncher -r


-c and --config


Input: Path

Default None

Specify the absolute path to a JSON file with your settings. JSON configs will override command line configs if set.

Example:

$ cruncher -c "C:\path_to_config_file\config.json"


--help


Show the help message and exit.

Example:

$ cruncher -help