We obviously need to find a way to do color conversion if needed. It would be nice to have a mechanism here to correctly do nothing if nothing is needed, otherwise do accelerated conversion. Mostly, BRGA -> RGBA, BRG->RGB, etc., and use platform-specific code to gain performance, such as using Accelerate Framework in OSX / iOS : https://developer.apple.com/library/mac/documentation/Performance/Reference/vImage_morphological/Reference/reference.html#//apple_ref/doc/uid/TP40005492.

I don't say do it now, just separate the _convert_buffer be another file and implement the initial conversion stuff for memory block as well :)