Hello, I just studied Python.
I looked up a lot of image RGB changes on Python with Google.
You usually use PIL or WAND.
I don't know how to change it Leave a question! What should I use on Python 3?
In the case of wand, I think it's only possible in Python 2.
I'd appreciate it if you could explain it in detail.
To Python - Before Image Change
-After changing the image
Check out the pillow.
I tried pip3 install Pillow
on my mac and the following code worked well. Code for black-and-white conversion.
from PIL import Image
img = Image.open('image.png').convert('LA')
img.save('greyscale.png')
Please refer to this link for instructions and installation on other platforms and for installation on other platforms.
© 2024 OneMinuteCode. All rights reserved.