add setContrast function

Adding setContrast function, it can be set from 0 to 255.