draw image from file
Published: 21. January 2009 | Updated: 21. January 2009License: Microsoft Public License (MS-PL)
Categories: GDI
Tags: C# GDI Winforms
Import namespace
using System.Drawing;
Code
// create image from file Image img = Image.FromFile(@"C:\image.jpg"); // create graphics Graphics graphics = this.CreateGraphics(); // draw image graphics.DrawImage(img, Point.Empty); // dispose img.Dispose(); graphics.Dispose();
| Send us feedback about this snippet » |





