Skip to content

Instantly share code, notes, and snippets.

@daskol
Created February 21, 2018 20:40
Show Gist options
  • Save daskol/d12c7105be4d9b7c600d48f88bb75099 to your computer and use it in GitHub Desktop.
Save daskol/d12c7105be4d9b7c600d48f88bb75099 to your computer and use it in GitHub Desktop.
JPG to PNG converter in python with pillow
#!/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