Jump to content

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

Fricken Hamster

Recommended Posts


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




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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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