Edit a BMP image in PictureBox.

One way is to access the bitmap object and use the SetPixel() method to overwrite parts of the bitmap.
 
It depends exactly what you want to do. One option is to allow the user to draw on the PictureBox using GDI+ and then, to make it permanent, perform the same drawing on the Image object being displayed. You would need some way to store the data representing the drawing to do it that way. If you want to make it permanent immediately, you can just draw onto the Image in the first place. If you want to do that, you should do some reading on GDI+ first. You should understand the subject first, rather than just trying to copy and paste code that others have written for you, which you'd have no idea how to debug or modify.,
 
*** removed unnecessary quote ***

I do not expect to receive any code to copy/paste.
I began programming in DOS in 1982! Then Basic! Then C! Then C#! I merely wanted a nudge to where I could find an alternative method which I could use in VS 2022. Anyway .... I worked it out. Because I also have vast experience in GDI. But I have a better solution.
 
Last edited by a moderator:
For future reference, I recommend providing more detail in your question. Then we won't have to make guesses or assumptions about what you have and what you know and you won't have to explain why those guesses or assumptions aren't correct. Assume that too many words is better than not enough.
 
Back
Top Bottom