I looked at examples of working with images, but have not yet understood which approaches are most effective in terms of performance. Tell me, please, what controls and classes can I use to remove the transparent area around the sprite?
My sprites are stored in PNG files (32 bits, RGBA).
1. open sprite image from file.
2. calculate the rectangle bounding the opaque area of the sprite.
2. remove the transparent area around.
3. save the result to a PNG file.