Is it possible to replace PictureBox1 with a webcam and save the image by writing the name of the image in a text box and saving it in a specific place without opening the image save dialog
@swarg26472 жыл бұрын
as per your requirement we need picture box controlle to open web cam and capture the image.... For more details read these article.... www.aspsnippets.com/questions/173314/Capture-image-from-WebCam-and-display-in-PictureBox-in-Windows-Application/
@xeldrin84655 жыл бұрын
Hey, amazing tutorial. Everything is working great for me up to the part where you crop the image. I have followed your code exactly, except for that I want to output the cropped image in the same picturbox. The bitmap crop gives me a parameter is not valid error. Any ideas?
@swarg26475 жыл бұрын
Hi, Sometimes You Just try to double click on picture box, So that time Height and Width Of Rectangle Is 0. And throw the runtime error. You should try to debug the picFromImg_MouseUp Event and add breakpoint in this line [if (rect != null]). So you understand the error. Now Your Solution: To Cropped img in same picture box: just comment out this line : - picTargetImg.Image = cropImg; And add this: - picFromImg.Image = cropImg; the above solution as per my source code. and i check it its working properly.
@xeldrin84655 жыл бұрын
@@swarg2647 thx for the reply. The problem was that it was not waiting for the mouse up event for me for some reason, but got it fixed now:) thx again!
@swarg26475 жыл бұрын
welcome
@erenterlikli28215 жыл бұрын
@@swarg2647 I have the same error but it didn't work. Also when you want to crop the picture, rectangle is not showing on the picture so you can not. How should i do?
@swarg26475 жыл бұрын
@@erenterlikli2821 can you please describe the error ?
@NgocAn5 жыл бұрын
Thank you so much
@swarg26475 жыл бұрын
Welcome
@NgocAn5 жыл бұрын
@@swarg2647 Can you help me algorithm rotate image with any angle in C#? I had to search but only encounter the flip algorithm. Thank and good luck to you.