how to get the box of where an image is white python pillow code example Example: pil resize image im = Image.open('image.jpg') im = im.resize((w, h))