I have a Image say 'X' (RGB) from which i want to get Image of RED Channel using Imagick I tried refering http://www.imagemagick.org/Usage/quantize
Asked
Active
Viewed 4,846 times
4
-
2convert image.gif -channel R -separate red.gif // Red Channel Image – Jalpa Bhavsar Mar 29 '12 at 06:36
-
2convert image.gif -channel G -separate green.gif // Green Channel Image – Jalpa Bhavsar Mar 29 '12 at 06:36
-
2convert image.gif -channel B -separate blue.gif // Blue Channel Image – Jalpa Bhavsar Mar 29 '12 at 06:37
-
2you can add your comments as an answer and accept it – Cfr Apr 21 '17 at 05:28
-
1The Imagick equivalent is separateImageChannel( ChannelValue ). See http://us3.php.net/manual/en/imagick.separateimagechannel.php – fmw42 Aug 05 '18 at 00:14
1 Answers
5
The command you need can be found in the ImageMagick documentation at https://www.imagemagick.org/Usage/color_basics/#separate:
Separating Channel Images
The easiest way separating out the individual color channels is to use the "-separate" operator to extract the current contents of each channel as a gray-scale image.
convert rose: -channel R -separate separate_red.gif convert rose: -channel G -separate separate_green.gif convert rose: -channel B -separate separate_blue.gif
(In these examples, the rose:
parameter makes it use a small built-in image of a rose for the input.)

mwfearnley
- 3,303
- 2
- 34
- 35