473,569 Members | 2,761 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

finding the boundary of an irregular shape

6 New Member
Hello thescripts readers,

I have a bitmap consisting of an irregular figure on a transparent background. I'd like to convert the figure's boundary into a graphics path. Can anyone suggest an efficient way to do this? The aim is to use the path for (among other things) drawing an outline round the image with a GDI+ pen.

I guess there must be a method which examines every pixel in the image for how many transparent neighbours it has, though I am hazy about details. How many neighbours should count? In the simplest case the figure could be fully opaque but I hope to find a solution where the image is partly transparent and I can tinker with the cutoff level (e.g. alpha<20%= background).

I presume there must be some way to do it using a matrix and I could use some guidance on how to code that. I'll be grateful if anyone can suggest or point me to a VB.Net solution.

thanks in advance, Vic (aka boops_boops aka a bogue: look it up.)

P.S. I hope I won't end up having to answer my own question again!
Dec 9 '06 #1
0 971

Sign in to post your reply or Sign up for a free account.

Similar topics

11
1713
by: Bastiaan Welmers | last post by:
Hi, I wondered if anyone has ever met this same mbox issue. I'm having the following problem: I need find messages in huge mbox files (50MB or more). The following way is (of course?) not very usable: fp = open("mbox", "r")
46
2483
by: dawn | last post by:
Hi all, I am now working on a C program under Unix. The requirement for the program is that: A file name is passed to program as a parameter. The program will Find files under a specified directory. The matched file must have the same content with the given file. It does not matter whether the filenames are the same. It is easy to find...
2
3945
by: ppyrstr | last post by:
I have been trying to figure out how to have a custom control that is irregular (non-rectangular) not interfere with other elements on the screen that may interfere with it's "regular" shape (the control defining rectangle). For example, if I make a custom control that simply paints a circle inside its bounding box, how can I have the...
2
9900
by: szabi | last post by:
Hi! I have seen in a couple of libraries that object are never passed through dll boundary, instead the results are returned through an output parameter reference like: void f(std::string &s) { s = "foo"; }
5
11528
by: sunil borwankar | last post by:
I am trying hard to make Custom Command Buttons of Irregular Shape and of Different colours in Active X Interface Wizard but am not successful. Irregular Shape Buttons i.e.; Triangular, Arrow Shape and Hexagonal are made and are responding in click event but I am not able to provide colors to them. I used Window API programming also but buttons...
0
945
by: boopsboops | last post by:
Hello thescripts readers, (Sorry for cross-posting, folks. Today I see that I can post to the VB.Net forum after all. Has the site changed or am I getting a bit dotty?) I have a bitmap consisting of an irregular figure on a transparent background. I'd like to convert the figure's boundary into a graphics path. Can anyone suggest an efficient...
0
1668
by: dr | last post by:
C# Irregular shaped user controls. How to make usercontrol have transparency key for its background image? I want to have irregular shaped user controls on my form. like a funny shaped button. This works fine for irregular shaped forms becuase they have a transparency key field, but user controls dont have this field. note i do not want to...
11
6361
by: devnew | last post by:
hello while trying to write a function that processes some numpy arrays and calculate euclidean distance ,i ended up with this code (though i used numpy ,i believe my problem has more to do with python coding style..so am posting it here) .... # i am using these numpy.ndarrays to do the calculation facespace # of...
6
3017
by: Nobody | last post by:
hi there, suppose I want to iterate for a specific variable e.g. i , but for non regular (or consecutive) values. For example i=0,1,2,4,5,7,8 etc how can I do that with a for loop? MY solution which is not that elegant involves if statements (or switch statements) in the body of the loop: e.g.
0
7697
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8120
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6283
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.