Re: The Incredible SuperCard Shrink Tool
Posted: Tue Nov 23, 2021 8:29 am
Thanks Stam and Roger,
Roger, if you want to understand what is going on then this link is from where I got the idea how to do it
http://www.imageprocessingplace.com/dow ... m/ray.html
In this particular implementation the algorithm scans the maskData of an image with transparencies. That is the step where you take the snapshot from the group that provides the transparencies around the opaque graphics. In an image with transparencies the maskData gives you byteToNum = 0 for transparent and 255 for opaque for all pixels. Only those 2 values are provided by the maskData. This information is used in the tracing algorithm.
That code was a pain to write and is a pain to understand...
I also made a version for color where you extract the colors of an image to turn the image into graphics that you can colorize (I limit it to max 12 colors).
It was fun to take an algorithm and turn it into actual code though.
Kind regards
Bernd
Roger, if you want to understand what is going on then this link is from where I got the idea how to do it
http://www.imageprocessingplace.com/dow ... m/ray.html
In this particular implementation the algorithm scans the maskData of an image with transparencies. That is the step where you take the snapshot from the group that provides the transparencies around the opaque graphics. In an image with transparencies the maskData gives you byteToNum = 0 for transparent and 255 for opaque for all pixels. Only those 2 values are provided by the maskData. This information is used in the tracing algorithm.
That code was a pain to write and is a pain to understand...
I also made a version for color where you extract the colors of an image to turn the image into graphics that you can colorize (I limit it to max 12 colors).
It was fun to take an algorithm and turn it into actual code though.
Kind regards
Bernd