Neuerstellung

- Quelle: https://github.com/oxyplot/oxyplot
This commit is contained in:
2023-09-02 09:24:59 +02:00
commit 9520c1fa4a
810 changed files with 117869 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="BitmapTools.cs" company="OxyPlot">
// Copyright (c) 2014 OxyPlot contributors
// </copyright>
// --------------------------------------------------------------------------------------------------------------------
namespace WpfExamples
{
using System.Drawing;
using System.Drawing.Drawing2D;
public static class BitmapTools
{
public static Bitmap Resize(Bitmap bitmap, int newWidth, int newHeight)
{
var resizedBitmap = new Bitmap(newWidth, newHeight);
var g = Graphics.FromImage(resizedBitmap);
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.DrawImage(bitmap, 0, 0, newWidth, newHeight);
g.Dispose();
return resizedBitmap;
}
}
}