<jupyter_start><jupyter_text><jupyter_code>from PIL import Image, ImageFilter, ImageFont, ImageDraw
from matplotlib.pyplot import imshow

print('Setup Complete')
# pre-visualizing image
file_name = '9.5.7_hillside_for_PIL_example.jpg'
im = Image.open(file_name)
imshow(im)
# image informations
print(f'size: {im.size} \nformat: {im.format_description} \nmode: {im.mode}')
# croping image
crop = (200, 200, 600, 600)
cropped_image = im.crop(crop)
imshow(cropped_image)
# image resized
resized_image = im.resize((400, 200))
imshow(resized_image)
# converting to gray scale
gray_scale = im.convert('LA')
imshow(gray_scale)
# adding gausshian blur
effect_image = im.filter(ImageFilter.GaussianBlur(radius=10))
imshow(effect_image)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12433862433862433, 'fraction_numerical': 0.03042328042328042, 'mean_word_length': 7.7011494252873565, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '337022', 'license': 'MIT', 'n_tokens_mistral': 303, 'n_tokens_neox': 281, 'n_words': 57, 'path': 'image-manipulation.ipynb', 'repo_name': 'silvioedu/MachineLearning-Practice', 'size': '756'}