use bytesPerPixel when scanning image, not fixed 1 and 3 values
Authored by: rmottola 2014-11-25
Parent: [r399]
Child: [r401]