Implemented Gray-scale and bi-scale directly image convertion functions