programmatically trimming (automatically cropping out transparent boundaries) an image in objective-

Posted by Ferris on Stack Overflow See other posts from Stack Overflow or by Ferris
Published on 2010-03-15T23:35:46Z Indexed on 2010/03/15 23:39 UTC
Read the original article Hit count: 362

Does anyone know how to trim an image (uiimage or cgimage). By trim I mean programatically cropping to the non-transparent bounds of an image. So if I have the image below:

  • 00111000
  • 00010000
  • 01011110
  • 00000000

it would yield:

  • 011100
  • 001000
  • 101111

© Stack Overflow or respective owner

Related posts about iphone

Related posts about graphics