readpixel - make compatible with pre C++11 syntax
COLOR_DEPTH_RGB > 24 - use defines to condense duplicate code

Easier to see what different in the two versions
Less chance of changing code one place and not the other.
Would need 16 bit per chanel for color depths between 24 and 36