Jump to content

Trim off transparent pixels, or get a bounding box around non transparent?


Fricken Hamster
 Share

Recommended Posts

Hey,

How would I trim off transparent pixels around a sprite, leaving the smallest sprite without trimming off anything thats not transparent?
Getting a bounding box around non transparent pixels would work too.

If that is impossible, can I check pixel values at coordinates for sprites?

AS3 equivalent would be

BitmapData.getColorBoundsRect

 

Thanks

Link to comment
Share on other sites

You'd do this as part of the pre-processing work, not at run-time. Invest in Texture Maker, it's invaluable. But a free alternative is the excellent Shoebox. Although if you're used to Flash then just dump all the PNGs into a Flash library, select them all and "Generate Sprite Sheet" from them. Needs CS6+

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...