title: Process image to find external contour
body: <p>I have hundreds of PNG images for which I have to generate corresponding B&amp;W images that show the outer outline of the object. The source PNG image has alpha channel, so the "no object" parts of the image are 100% transparent.</p>
  
  <p>The tricky part is that if the object has holes in it, those should not be seen in the outline. So, if the source image is, say, donut, the respective contour image would be a jagged circular line with no concentric smaller line in the middle.</p>
  
  <p>Here is an example image, source and its contour: <img src="https://i.stack.imgur.com/GUJPE.png" alt="enter image description here"></p>
  
  <p>Is there any library or command-line tool that can do this? Ideally, something that could be used from Python.</p>