public DrawImageUnscaled ( Image image, Point point ) : void | ||
image | Image | |
point | Point | |
return | void |
Bitmap image = new Bitmap("image.jpg"); Graphics g = Graphics.FromImage(image); Bitmap logo = new Bitmap("logo.png"); g.DrawImageUnscaled(logo, 10, 10); image.Save("image_with_logo.jpg");
public void Draw(Graphics g) { Bitmap image = new Bitmap("image.jpg"); g.DrawImageUnscaled(image, 0, 0); }In this example, the Draw method takes a Graphics object as a parameter and draws a bitmap image onto it using the DrawImageUnscaled method. This example can be used as part of a larger application that requires drawing images onto a canvas. The package library that provides the System.Drawing namespace is part of the .NET Framework, which is a software development framework developed by Microsoft.