how to get pixels

Hi experts,

I am drawing (colored lines) scribbles on the image, How can I get the  pixel values(ie x and y) inside the selected area. I have got points( x and y) for selected area. I have attache bmp file containing selection pl see.

 I need each and every point inside selected area.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Peter HartCommented:
Hi, here are 2 tutorials on how to do this manually.  I personally use dreamweaver which can produce the coordinates automatically.
you'll need to set up a polygon:
inampudi1Author Commented:

I need some algorithm  to get [x,y] valuesas into a unsigined char*.......Here some code is their  in java. is their any algorithm for that?
inampudi1Author Commented:

   Here my selected area may not be  exactly rectangle or triangle or hexagonal, it may be irregular shape also.

But I need all  pixel values inside my selection. Here I have input as co-ordinate values of border of selected area.
CompTIA Security+

Learn the essential functions of CompTIA Security+, which establishes the core knowledge required of any cybersecurity role and leads professionals into intermediate-level cybersecurity jobs.

Peter HartCommented:
you will have to look at how HTML does it.  its done by html
for instance a circle would something like:
<map name="Map"><area shape="circle" coords="50,18,9" href="test.asp">
and placed at the end of the html page.  All we know is the centre of the circle and the raduis
another example:  html does the rest.
inampudi1Author Commented:

   Actually I dont no HTML, and I have to get inside pixel values in to a  variable  and I need to pass it to some other function in my application. Is their any other way....or how can I use your method for iregular shapes , as I showned in attached image.

inampudi1Author Commented:

Here I am working on delphi ... if any algorithm is their means I can implement it.
Geert GOracle dbaCommented:
while you are drawing create an array with (x, y) points
then use the CreatePolyPolygonRgn() function to create a windows region
then you can run over the image from top to bottom and left to right giving you a image (x, y)
then use PtInRegion() function to see if the point is in the region
that should do it

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
inampudi1Author Commented:

I got the solution now it is working fine.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MultiMedia Applications

From novice to tech pro — start learning today.