B
Btb4198
Guest
I am using Aforge. I added a zoom and pan function that seems to be working, but I want to save the frame with the zoom and pan added to it but I can't seem too:
g.DrawImage(currentFrame, imagex, imagey, imgWidth, imgHeight);
That line has the correct information for zoom and pan and it works. The problem is I need to save it as a bitmap and using it later, but nothing I tried works,
I tried this:
g.DrawImage(currentFrame, imagex, imagey, imgWidth, imgHeight);
newWide = (int)(imgWidth - imagex);
newHeight = (int)(imgHeight - imagey);
currentPic = new Bitmap(currentFrame, newWide, newHeight);// imgWidth, imgHeight);
But the image was not correct. I know because I displace currentPic in a picture back.
Can anyone help me?
Continue reading...
g.DrawImage(currentFrame, imagex, imagey, imgWidth, imgHeight);
That line has the correct information for zoom and pan and it works. The problem is I need to save it as a bitmap and using it later, but nothing I tried works,
I tried this:
g.DrawImage(currentFrame, imagex, imagey, imgWidth, imgHeight);
newWide = (int)(imgWidth - imagex);
newHeight = (int)(imgHeight - imagey);
currentPic = new Bitmap(currentFrame, newWide, newHeight);// imgWidth, imgHeight);
But the image was not correct. I know because I displace currentPic in a picture back.
Can anyone help me?
Continue reading...