I don't know what's wrong and why nothing worked for me. The picture is 500x500.
I tried using arrays and loops but It didn't work out. My code
from PIL import Image
picture_resized = picture.resize( (500,500) )
im = np.array(Image.open('Lenna.png').convert('RGB'))
Image.fromarray(im).save('result.png')
im[0::2,0::2] = [0,0,0]
im[0::3,0::3] = [0,0,0]
%matplotlib notebook
plt.imshow(picture_resized)