Click here to Skip to main content
15,860,844 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Every1,

I do study on image processesing lately. I need some information to improve myself.
So far, I have made processes which applies entire picture.
But now I want to process the image where I click. So I kind of need to create brushes, use them. I have no idea how to do this.

1.) I wonder if anyone can lead me some websites or references that I can read and learn how to achieve creating brushes and using them on image in c#.

Apart from this, I ve been looking for finding the actual coordinates of the pixel I click on. I found a piece of code that I get the coordinates of picturebox. But it's not the actual image most of the time ( for example, when the picture is streched or zoomed or something)
2.) How can I get the actual image coordinates by clicking on it?

Thanks already...
Posted

What sort of brushes do you want to create ? I wrote a GDI+ article ages ago ( although it may be in c++ ) covering the different types of brushes.


wrote:
2.) How can I get the actual image coordinates by clicking on it?


Your best bet is to draw your own image in your paint event, so that you are responsible for any resizing that occurs, and can therefore reverse that algorithm to convert a point in the image on screen to that point in the actual image.

Pictureboxes are not really compatible with image processing.
 
Share this answer
 
I want to create some circual brushes. I ve got some filters I ve written. I want to apply this filters not entire picture, but the point I click and and inside this brushes...
So I'm kind of stuck now :)

About drawing my own image... what do you mean? Where else can I draw my image apart from picturebox? I'm still pretty new in programming. Would appreciate a lot if you helped a bit more, too :)
 
Share this answer
 
Comments
CHill60 18-Apr-20 8:30am    
If this was meant to be a response to Solution 1 then you will need to use the "Have a Question or Comment?" link next to it for the poster to be notified. Don't post comments or questions as solutions - this is for your benefit, assuming you want the right people to read your comment
The best way to do that, IMO, is to create the brush as a bitmap, with a section around the circle drawn in a color not used inside the brush. Then you can use an ImageAttributes class to specify a range of colors to draw transparently, in order to draw only the circle.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900