I am trying to create an image file using an array of grayscales but don\'t know how to do it. Here is the code I have now. Is there a method to set grayscale value at speci