$ cd [installation-directory]
$ git checkout https://github.com/bjoern-hempel/bash-cmyk-to-rgb.git .
Be sure that you comply with the licence conditions. Download, unzip and save the profiles in an accessible directory ([profile-directory]
).
$ cd [working-directory]
Copy the .profiles.dist file into your working directory:
$ cp [installation-directory]/.profiles.dist .profiles
Adjust the profile paths (SETTING_PROFILE_CMYK
, SETTING_PROFILE_RGB
) according to your configuration:
$ vi .profiles
$ [working-directory]/bin/convert-cmyk-to-rgb.sh -h
Usage: convert-cmyk-to-rgb.sh [options...]
-i, --image-filter Change the image filter (default: jpg|gif|png|jpeg|tif)
-w, --working-directory Change the working directory (default: current directory)
-r, --replace Replace the image instead of copying it.
-f, --force Force to convert the image (no dry run).
-x, --verbose Set output to verbose.
-h, --help Shows this help.
-v, --version Shows the version number.
$ [working-directory]/bin/convert-cmyk-to-rgb.sh -x
→ Filename: ./user_upload/folder1/file1.jpg
→ Colorspace: sRGB
→ Size: 568K
→ STATUS: fine
→ Filename: ./user_upload/folder1/file2.jpg
→ Colorspace: sRGB
→ Size: 392K
→ STATUS: fine
→ Filename: ./user_upload/file3.jpg
→ Colorspace: CMYK
→ Size: 12M
→ STATUS: to be converted
→ Dryrun. Use -f to convert.
...
$ [working-directory]/bin/convert-cmyk-to-rgb.sh -w /path/to/images -i -x
$ [working-directory]/bin/convert-cmyk-to-rgb.sh -w /path/to/images -i "jpg|jpeg|tif|tiff" -x
$ [working-directory]/bin/convert-cmyk-to-rgb.sh -w /path/to/images -i "jpg|jpeg|tif|tiff" -f -x
$ [working-directory]/bin/convert-cmyk-to-rgb.sh -w /path/to/images -i "jpg|jpeg|tif|tiff" -f -x -r
- Specification of the profiles also as parameters
- Loop through some ImageMagick parameters (quality, etc.)
- Output log file for all changes
- Etc.
- Björn Hempel - Initial work - Björn Hempel
This project is licensed under the MIT License - see the LICENSE file for details
Have fun! :)