Stretching and Transforming Pictures
-
Can on use "transforming" and "stretching" to copy a part of one picture to another picture object. Thanks
You can use Graphics.DrawImage to draw part of one image onto another. Just use: Graphics g1 = Graphics.FromImage(destinationImage); g1.DrawImage(sourceImage, you can specify source coordinates and destinartion coordiates here just lookup the many overload for DrawImage); g1.Dispose();
-
You can use Graphics.DrawImage to draw part of one image onto another. Just use: Graphics g1 = Graphics.FromImage(destinationImage); g1.DrawImage(sourceImage, you can specify source coordinates and destinartion coordiates here just lookup the many overload for DrawImage); g1.Dispose();
Thanks for that When I try that code i.e. _____________________________________________________________________________ Graphics g1 = Graphics.FromImage(viewer1.Image); g1.DrawImage(dxfdefaultBox.Image, new Rectangle(1,1,400,300),new Rectangle(1,1,1000,1000),GraphicsUnit.Pixel); g1.Dispose(); _____________________________________________________________________________ I get a "An unhandled exception of type 'System.ArgumentNullException' occurred in system.drawing.dll". viewer1.Image is stated as viewer1 does exist as a pictureBox on the form, and I can write directly to it through a device context -do you have any idea as to why it would appear as a null item in this use ? Thanks