Answers for "get image pixel data PIL"

0

python pil get pixel

im = Image.open('image.gif')
rgb_im = im.convert('RGB')
r, g, b = rgb_im.getpixel((1, 1))

print(r, g, b)
>>> (65, 100, 137)
Posted by: Guest on March-01-2021
20

pil get image type

img = Image.open(filename)
print(img.format)  # 'JPEG'
Posted by: Guest on May-15-2021

Python Answers by Framework

Browse Popular Code Answers by Language