flat assembler
Message board for the users of flat assembler.

flat assembler > Windows > I need found rect image.

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 495
My image have 20 sprites with alpha channel.
I need found rect min\max alpha channel for each sprite.

I search algorithm how do this.

I want get something like this:
https://www.youtube.com/watch?v=l_8uMZcPxHw#t=38
Post 22 May 2019, 04:03
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2795
Location: dank orb
The application is open source, and the algorithm is in:
https://github.com/ForkandBeard/Alferd-Spritesheet-Unpacker/blob/master/ASU/BO/RegionUnpacker.cs

While a pixel is not the background color the rectangle is increased - in X and Y. This is done in multiple threads, and then overlapping rectangles are combined.

_________________
¯\(°_o)/¯ unlicense.org
Post 23 May 2019, 00:39
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 495
Thanks !
Post 23 May 2019, 03:30
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.