Generate image from pixel values. Each row specifies a pixel.