با استفاده از Python و کتابخانه PIL، تصاویر خود را به خاکستری تبدیل کنید
First, install the necessary module:
pip install pillow
Then, use this script:
from PIL import Image
in_img = 'input.jpg'
out_img = 'grayscale.jpg'
# Open the image
with Image.open(in_img) as img:
# Convert the image to grayscale
grayscale_img = img.convert('L')
# Save the grayscale image
grayscale_img.save(out_img)
#code
#Python_tricks
#library
🆔 @Python4all_pro

