Results 1 to 14 of 14

Thread: Help required in understanding x y values when using RC6 Cairo BindToArray

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2017
    Posts
    760

    Question Help required in understanding x y values when using RC6 Cairo BindToArray

    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:

    Name:  taxitask coark board.jpg
Views: 1083
Size:  33.3 KB
    Attachment 190833
    The alpha channel pngs that look like this:

    Name:  taxi.png
Views: 1026
Size:  46.5 KB

    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.

    Name:  taxi with contour highlighted.png
Views: 1059
Size:  53.9 KB

    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:

    Name:  taxis with holes zoomed.jpg
Views: 1027
Size:  31.8 KB

    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:
    Attached Files Attached Files
    Last edited by tmighty2; Mar 19th, 2024 at 08:07 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width