|
BitmapExtensionsResize(Image, Size) Method
|
Returns a resized
Bitmap image of the original.
Namespace: GSF.DrawingAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.282-beta+fbfa6baa1521236175f6d73fb2eb151a42453aef
Syntax
Example
This example shows how to resize an image:
using System;
using GSF.Drawing;
using System.Drawing;
class Program
{
static void Main(string[] args)
{
// Load the original image.
Bitmap original = (Bitmap)Bitmap.FromFile("Original.jpg");
// Resize the original image.
Bitmap originalResized = original.Resize(new Size(800, 600));
// Save the resized image to file.
originalResized.Save("OriginalResized.jpg");
// Clean-up.
original.Dispose();
originalResized.Dispose();
Console.ReadLine();
}
}
See Also