I want to create a coark board pin it from a coark board background image and alpha channel pngs.
The final result should look like this:
Attachment 190833
The alpha channel pngs that look like this:
When I such an image in an image editor, you can see tha tthe image editor automatically drew a line around the contour of the car.
I wonder which mechanism it uses to do that. So I make a pixel transparent pixels and a big hole using a brush a bigger radius and a vignette.
When I zoom in, I see this:
I do not understand the image editor's contour detection algorithm when I take a look at the big whole that I have just created. I expected the contour outline to be placed at the fully opaque pixels. However, they are placed at what I believe is like alpha = 0.5.
Nevertheless, I believe that this is the same algorithm that I need to apply to an alpha channel png in VB6 using RC6 in order to be able to draw a paper-like white border around the all opaque pixels.
The closest code that did some detection on images using RC6 and Cairo surfaces was Edge Detection by Olaf Schmidt, so I try to adapt it to my needs.
For my purposes, I have to get rid of the taxi dropshadow anyway.
The first task I want to use RC6 for is to dilluate fully opaque pixels into order to create something that looks like "cut from paper".
So the first thing I try to do it detect all fully opaque pixels and give them a certain color and to detect all semitransparent pixels and set their alpha to 0 (=fully opaque).
I do not manage to do that, and I do not understand why not.
That is why I am requesting help.
Thank you
I have attached the code and the result which is this:




Reply With Quote
