I have a series of transparent logos. I paste them on a canvas using PIL. Some of these logos have extra transparent pixels that make the bounding box too wide, like this:
However, I need these logos and the bounding boxes to be like this:
How can I remove these extra, unnecessary transparent pixels so the bounding box wraps the logo properly?
Here are some of the logos: