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.
test.bmp
inampudi1Asked:
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:

http://www.elated.com/articles/creating-image-maps/
http://www.javascriptkit.com/howto/imagemap.shtml
0
inampudi1Author Commented:
Hi,

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?
0
inampudi1Author Commented:
Hi,

   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.
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

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">
</map>
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.

http://www.december.com/html/demo/imagemap.html
0
inampudi1Author Commented:
hi,

   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.

0
inampudi1Author Commented:
Hi,


Here I am working on delphi ... if any algorithm is their means I can implement it.
0
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
0

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:
hi

I got the solution now it is working fine.
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.