initial commit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using System.Drawing;
|
||||
|
||||
namespace Pulsar.Server.Images.Helpers
|
||||
{
|
||||
public static class ImageChanger
|
||||
{
|
||||
public static Image ResizeImage(Image img, int width, int height)
|
||||
{
|
||||
Bitmap bmp = new Bitmap(width, height);
|
||||
using (Graphics g = Graphics.FromImage(bmp))
|
||||
{
|
||||
g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
|
||||
g.DrawImage(img, 0, 0, width, height);
|
||||
}
|
||||
return bmp;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user