<commit_before>__author__ = 'daniel'<commit_msg>Creates class to crop recipt<commit_after>import Image

__author__ = 'daniel'


def cropJPG():
    box1 = (0, 0, 736, 862)
    box2 = (750, 462, 1700, 1100)
    filename = "img/test1.jpg"

    image = Image.open(filename)

    image_crop1 = image.crop(box1)
    image_crop2 = image.crop(box2)

    image_crop1.save('img/testout1.jpg')
    image_crop2.save('img/testout2.jpg')

    del image, image_crop1
{'fraction_non_alphanumeric': 0.13082039911308205, 'fraction_numerical': 0.07538802660753881, 'mean_word_length': 3.7083333333333335, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2514436', 'n_tokens_mistral': 203, 'n_tokens_neox': 180, 'n_words': 34}