You can simplify complex multi-version crunches by creating a JSON config file.
Any settings in the config file will override the same setting if it was provided via command line arguments.
For example, if the following command pointed to the example config file below, The image directory
would be C:\path_to_images_dir\images
.
$ cruncher -d "C:\other_image_dir\" -c "C:\path_to_config\config.json"
{
"image": "",
"directory": "C:\\path_to_images_dir\\images",
"output": "C:\\path_to_images_dir\\images\\crunched",
"recursive": true,
"versions": [
{
"comment": "Thumbnail size",
"file_format": "JPEG",
"quality": 70,
"width": 200,
"height": 200,
"append": "thumb",
"keep_orientation": false,
"keep_metadata": false
},
{
"file_format": "JPEG",
"quality": 70,
"width": 600,
"height": 400,
"append": "full",
"keep_aspect": true,
"keep_orientation": false,
"keep_metadata": false
}
]
}
You can add a comment
to your version. This is not parsed by Cruncher and can help you remember the purpose of that version.
Note: Be sure to escape the slashes in the paths in your JSON config file.