Abstraction to get an image's channels

* If another data structure is used to store an image, this changes help the 
transition.