convert rgb image to binary in pillow
from PIL import Image
image_file = Image.open("cat-tied-icon.png") # open colour image
image_file = image_file.convert('1') # convert image to black and white
image_file.save('/tmp/result.png')
convert rgb image to binary in pillow
from PIL import Image
image_file = Image.open("cat-tied-icon.png") # open colour image
image_file = image_file.convert('1') # convert image to black and white
image_file.save('/tmp/result.png')
PIL image example
>>> from PIL import Image
>>> im = Image.open("image.jpg")
>>> im.show()
pil resize image
im = Image.open('image.jpg')
im = im.resize((w, h))
convert rgb image to binary in pillow
from PIL import Image
col = Image.open("cat-tied-icon.png")
gray = col.convert('1')
bw.save("result_bw.png")
pil module to create images
i don't know much but this link might help you @@@@
@
_@_
_/
https://code-maven.com/create-images-with-python-pil-pillow
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us