Spectrum, noncompeting, 1 byte
(Non-competing because this challenge inspired this language.) In reality, Spectrum is an npm library with a language interface for the commands.
I
Takes input as:
<filename>
channel
Call the program as:
cat input.txt | node spectrum.js "I"
Alternatively, you may supply information to the prompts:
λ node spectrum.js "I"
input> Ov3Gm.png
input> r
[ Image { 512x512 } ]
This leaves the image on the stack. To view it, add O
at the end, like so:
λ node spectrum.js "IO"
input> Ov3Gm.png
input> r
[]
For some extra fun, try echo filename | node spectrum.js "wO"
. It performs all three channel isolations at once: