from make_bytestring_from_image import * 
import sys
if len(sys.argv) == 1:
    print("I want a bmp file as input!")
    exit()
    
image = imread(sys.argv[1], as_gray=1)   

letter_width = 5
letter_height = 5
sep = 1
letters_per_row = 16
letter_rows = 3
arraysString = "{"
for rowInd in range(0,letter_rows):
    for colInd in range(0,letters_per_row):
        current_arr = image_to_vector(image, colInd * letter_width + (colInd * sep), rowInd * letter_height + (rowInd * sep), (colInd+1)*letter_width + colInd*sep, (rowInd+1)*letter_height + rowInd*sep)
        arraysString = arraysString + "{"+str(current_arr).strip("[").strip("]")+"},"
arraysString = arraysString.strip(",")+"}"
print (arraysString);
