diff --git a/bg_construct.png b/bg_construct.png new file mode 100644 index 0000000..4b6f801 Binary files /dev/null and b/bg_construct.png differ diff --git a/img2pa.py b/img2pa.py index 9317ceb..f18bbf1 100644 --- a/img2pa.py +++ b/img2pa.py @@ -1,2 +1,11 @@ -from PIL import image +from PIL import Image +import os +dir = os.getcwd() +img = Image.open(dir+'/bg_construct.png') + +for i in range(0, 251, 25): #for multiple iteration + thresh = i + fn = lambda x : 255 if x > thresh else 0 + r = img.convert('L').point(fn, mode='1') + r.save(dir + '/bg_const_bw_' + str(i) + '.png') \ No newline at end of file