crop((left, top, right, bottom)) then paste onto a canvas.
Goal
Paste a yellow square onto blue.
from PIL import Image
base = Image.new('RGB', (80, 80), (29, 79, 122))
logo = Image.new('RGB', (20, 20), (255, 200, 0))
base.paste(logo, (10, 10))
print(base.getpixel((12, 12)))
plt.imshow(base)
plt.axis('off')
plt.show()from PIL import Image
im = Image.new('RGB', (60, 40), (0, 128, 64))
print(im.crop((10, 5, 30, 25)).size)from PIL import Image
im = Image.new('RGB', (50, 50), (0, 0, 0))
im.paste((200, 40, 40), (5, 5, 20, 20))
print(im.getpixel((6, 6)))from PIL import Image
print(Image.new('RGB', (10, 10)).crop((0, 0, 10, 10)).size)