Created
September 30, 2015 00:51
-
-
Save heynemann/fc59ebdcfe77ca4e81a2 to your computer and use it in GitHub Desktop.
PIL Generates Artifacts in PNG Images
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/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