I've got a CIImage with an alpha channel. Big portions of it are fully transparent. I'd like to find the minimal axis-aligned bounding box containing the full nonzero-alpha region, and crop the image to this bounding box. Similar to the "auto-crop" feature in GIMP.
How should I proceed?