I have a small sample for Mono for Android here: https://github.com/Cheesebaron/MonoDroid.TrimTransparentPixels
It is most likely done in a similar way on MonoTouch. What I am doing here is just running through all the pixels and see if they are transparent and adjusting the bounds accordingly. On Wed, May 9, 2012 at 5:51 PM, victoria <[email protected]> wrote: > Hello list! > > I have a bunch of transparent PNG images, all the same size - I need to crop > out the transparent part around the actual content. It's been asked on stack > overflow before ( > http://stackoverflow.com/questions/2451225/programmatically-trimming ) with > some more or less working solutions in objc, but I can't help to think that > there's a better way. So, have anyone done this successfully in Monotouch? > Actually cropping the image probably isn't needed in most cases, as long as > one could get the bounding box of the transparent part you could just > justify the frame. > > Any thoughts on this or code to share would be much appreciated! > > / Victoria > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Best-way-of-cropping-out-the-transperancy-of-a-PNG-image-tp4620898.html > Sent from the MonoTouch mailing list archive at Nabble.com. > _______________________________________________ > MonoTouch mailing list > [email protected] > http://lists.ximian.com/mailman/listinfo/monotouch -- Med Venlig Hilsen / With Best Regards Tomasz Cielecki http://ostebaronen.dk _______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
