#!/usr/bin/env python3
import numpy as np
from PIL import Image
import os

directory = 'images/correctresolution/'
i = 0
# Load image and convert to '1' mode
#for filename in os.listdir(directory):
for i in range(7777):
	f = os.path.join(directory, "thumb-" + str(i) + ".png")
	im = Image.open(f).convert('1')
	im.save("pbm/" + str(i) + ".pbm")
	i = i + 1
