Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Remove the transparent area around the image (sprite optimization)
Remove the transparent area around the image (sprite optimization) [message #51756] Thu, 16 May 2019 10:51 Go to next message
Vitorio is currently offline  Vitorio
Messages: 1
Registered: May 2019
Junior Member
Hello.

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).
I need:
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.

index.php?t=getfile&id=5843&private=0

p.s. U++ is amazing!Smile
Re: Remove the transparent area around the image (sprite optimization) [message #51807 is a reply to message #51756] Fri, 07 June 2019 09:36 Go to previous message
mirek is currently offline  mirek
Messages: 12105
Registered: November 2005
Ultimate Member
FindFile
StreamRaster::LoadFileAny
FindBounds
Crop
PNGEncoder
Previous Topic: Painter: Excessive memory usage in PainterExamples moving window to edges of screen.
Next Topic: Drawing / Painter Difference,Usage,Manual
Goto Forum:
  


Current Time: Sun Nov 17 08:20:32 CET 2019

Total time taken to generate the page: 0.01213 seconds