title: PNG won't autocrop using image.getbbox()
body: <p>I've been trying to get this<img src="https://i.stack.imgur.com/atufJ.png" alt="image I want to crop">image to automatically crop to the smallest size possible, removing the transparent bits around it. I can't just crop this image myself manually, as more things will be added on the image like this <img src="https://i.stack.imgur.com/7DuX8.png" alt="image I want to crop as well">.</p>
  
  <p>I've been using this code:</p>
  
  <pre><code>from PIL import Image, ImageChops
  
  image=Image.open('headbase1.png')
  image.load()
  
  imageSize = image.size
  imageBox = image.getbbox()
  print(image.getbbox())
  cropped=image.crop(imageBox)
  cropped.save('headbase_end.png')
  </code></pre>
  
  <p>It does not crop out the transparency around it, and the bounding box is this (0, 0, 45, 45), which I do not think is right.</p>
  
  <p>Thanks, VOT.</p>
  
  <p>Edit, this does work: <a href="https://stackoverflow.com/questions/14211340/automatically-cropping-an-image-with-python-pil">Automatically cropping an image with python/PIL</a> with that image, however it refuses to work for my image. .</p>