Switch to using a single integer for each pixel in order to reduce memory consumption.
Avoid nasty memory leak by clearing out channel_data after it's used
Switch to using an Array for channel data
Cleanup and improve RLE decoding