Skip to content

Instantly share code, notes, and snippets.

@heynemann
Created September 30, 2015 00:51
Show Gist options
  • Save heynemann/fc59ebdcfe77ca4e81a2 to your computer and use it in GitHub Desktop.
Save heynemann/fc59ebdcfe77ca4e81a2 to your computer and use it in GitHub Desktop.
PIL Generates Artifacts in PNG Images
#!/usr/bin/python
# -*- coding: utf-8 -*-
from PIL import Image
def main():
im = Image.open("image.png")
im.thumbnail((259, 96))
im.save("image_thumbnail.png")
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment