mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-02 19:46:57 -05:00
Remove unused method
This commit is contained in:
@@ -238,28 +238,5 @@ public static Color Blend(Color color, Color backColor, double amount)
|
||||
byte b = (byte)((color.B * amount) + (backColor.B * (1 - amount)));
|
||||
return Color.FromArgb(r, g, b);
|
||||
}
|
||||
|
||||
// https://stackoverflow.com/a/24199315
|
||||
public static Bitmap ResizeImage(Image image, int width, int height)
|
||||
{
|
||||
var destRect = new Rectangle(0, 0, width, height);
|
||||
var destImage = new Bitmap(width, height);
|
||||
|
||||
destImage.SetResolution(image.HorizontalResolution, image.VerticalResolution);
|
||||
|
||||
using var wrapMode = new ImageAttributes();
|
||||
wrapMode.SetWrapMode(WrapMode.TileFlipXY);
|
||||
|
||||
using var graphics = Graphics.FromImage(destImage);
|
||||
graphics.CompositingMode = CompositingMode.SourceCopy;
|
||||
graphics.CompositingQuality = CompositingQuality.HighQuality;
|
||||
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
||||
graphics.SmoothingMode = SmoothingMode.HighQuality;
|
||||
graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
||||
|
||||
graphics.DrawImage(image, destRect, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, wrapMode);
|
||||
|
||||
return destImage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user