Created
April 8, 2019 04:00
-
-
Save maifeeulasad/94708b1676e524fbc533be6a83df58b4 to your computer and use it in GitHub Desktop.
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/local/bin/python3 | |
from PIL import Image | |
# Open Paddington | |
img = Image.open("input_file_name.jpg") | |
#increase for high resulation | |
si=16 | |
# Resize smoothly down to 16x16 pixels | |
imgSmall = img.resize((si,si),resample=Image.BILINEAR) | |
# Scale back up using NEAREST to original size | |
result = imgSmall.resize(img.size,Image.NEAREST) | |
# Save | |
result.save('output_file_name.jpg') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment