Last active
June 16, 2016 18:20
-
-
Save fwilhe/936f826804e81e566e4cfab2640c6bc7 to your computer and use it in GitHub Desktop.
Experimentation with Color Channels
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# picture licence: cc-by-sa Nakiel | |
wget https://upload.wikimedia.org/wikipedia/commons/e/e2/1213303317_gal_dsc_4158_02.jpg -O natur.jpg | |
convert natur.jpg natur.png | |
rm natur.jpg | |
# create separate pictures for each chanel in RGB, CMY and CMYK models. | |
convert natur.png -separate natur_RGB_%d.png | |
convert natur.png -colorspace CMY -separate natur_CMY_%d.png | |
convert natur.png -colorspace CMYK -separate natur_CMYK_%d.png | |
# create a montage of the pictures | |
montage -border 0 -geometry 660x natur.png natur_RGB*.png RGB.png | |
montage -border 0 -geometry 660x natur.png natur_CMY_*.png CMY.png | |
montage -border 0 -geometry 660x natur.png natur_CMYK*.png CMYK.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment