This is just something I am trying out. The idea is to get a little familiar with Python and its image processing capabilities before building any application. I am having some doubts on the jpeg compression type. I am using the graphics module.
To start with, I created a (blank) grayscale image and saved it (right away) with the following commands :
>>> import graphics
As expected, this gave me a blank image. However, when I check its pixel values, it doesn't give me a single byte, but gives me a triplet (RGB values?)
>>> im = graphics.Image.new((200,200),"L")
>>> im.save("D:\\blank.jpg", quality=100, bpp=1, compression="no"
I also tried loading the newly created image into another image and checked the pixel values :
My question is, if the image is a grayscale image, why is the pixel value a triplet, and not a byte? Shouldn't the output for a grayscale image be something along the lines of :
>>> bg = graphics.Image.open("D://blank.jpg")
X (where X is a number between 0 and 255)