Created
February 21, 2018 20:40
-
-
Save daskol/d12c7105be4d9b7c600d48f88bb75099 to your computer and use it in GitHub Desktop.
JPG to PNG converter in python with pillow
This file contains hidden or 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 | |
| import click | |
| import PIL.Image | |
| @click.command() | |
| @click.argument('input', type=click.Path(exists=True, dir_okay=False)) | |
| @click.argument('output', type=click.Path(exists=False)) | |
| def main(input, output): | |
| img = PIL.Image.open(input) | |
| img.save(output) | |
| if __name__ == '__main__': | |
| main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment