Is PIL's image coordinate indexing reversed? Is it indexed as image[column, row]?
I have an image which I open using PIL (pillow)
img = Image.open('picture.png').load()
and when I try to print the pixel value of the first row, second column
print(img[0,1])
I get the pixel value of the 2nd row's first column
Can anyone clear this out?
The image index is a higher-level manifest which points to specific image manifests, ideal for one or more platforms. While the use of an image index is OPTIONAL for image providers, image consumers SHOULD be prepared to process them.
Python Imaging Library is a free and open-source additional library for the Python programming language that adds support for opening, manipulating, and saving many different image file formats. It is available for Windows, Mac OS X and Linux. The latest version of PIL is 1.1.
PIL indexes images in Cartesian co-ordinates. So it is indexed as img[col, row]
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With