Skip to content

Instantly share code, notes, and snippets.

@opparco
Created May 23, 2017 13:38
Show Gist options
  • Save opparco/6026a7498a14bc586ac2e71a799ffcb0 to your computer and use it in GitHub Desktop.
Save opparco/6026a7498a14bc586ac2e71a799ffcb0 to your computer and use it in GitHub Desktop.
ドット絵こんばーたをローカル環境で動かす
#!/usr/bin/python
#
# pixelate.py
#
# https://github.com/tsutsuji815/pixel_convert
#
# pip install opencv-python
# pip install Pillow
from pixel import make_dot
import cv2
if __name__ == '__main__':
import sys
img_path = sys.argv[1]
img_res = make_dot(img_path, k=16, scale=3, blur=50, erode=1)
result_path = 'out.png'
cv2.imwrite(result_path, img_res)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment