Code to know when an image is based on gray scale or not.