Created
April 16, 2020 17:08
-
-
Save aasmpro/341dc01ceef7eee3ac14068cab304f87 to your computer and use it in GitHub Desktop.
craete pattern with python
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
from PIL import Image | |
import sys | |
image = Image.open(sys.argv[1]) | |
image = image.resize((10, 10), Image.ANTIALIAS) | |
image2 = Image.new('RGB', (1000, 1000)) | |
for y in range(0, 1000, 10): | |
for x in range(0, 1000, 10): | |
image2.paste(image, (x,y)) | |
image2.save(sys.argv[2], 'PNG', quality=100) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment