use hasColor
use bytesPerPixel when scanning image, not fixed 1 and 3 values
migrate to NSInteger
work with byte-aligned pixels
handle byte-aligned images
support 16bit images and byte-aligned pixels