Last active
April 13, 2024 12:53
-
-
Save mb6ockatf/abb98f0591955f677edc17dbee35f68c to your computer and use it in GitHub Desktop.
convert image to grayscale
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from PIL import Image | |
img = Image.open('image.jpg').convert('L') | |
img.save('greyscale.jpg') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from PIL import Image | |
img = Image.open('image.jpg').convert('L') | |
img.save('greyscale.jpg') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[tool.poetry] | |
name = "grayscale" | |
version = "0.1" | |
description = "convert picture to grayscale" | |
authors = ["mb6ockatf <mdddmmmm@yandex.ru>"] | |
license = "AGPL" | |
readme = "README.md" | |
package-mode = false | |
[tool.poetry.dependencies] | |
python = "^3.11" | |
pillow = "^10.3.0" | |
[build-system] | |
requires = ["poetry-core"] | |
build-backend = "poetry.core.masonry.api" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment