Image grayscale transformation program design