Method and apparatus for contrast setting of an image