Switch back to mono System.Drawing with changed namespace because of a conflict between .net standard and mono on System.Drawing.Color. :(

This commit is contained in:
Cinder Biscuits
2017-09-03 20:54:34 -05:00
parent 6d958c3d90
commit 0b128c1291
19 changed files with 154 additions and 168 deletions

View File

@@ -1,6 +1,7 @@
using System;
using System.Threading;
using System.DrawingCore;
using System.DrawingCore.Drawing2D;
using OpenMetaverse.Imaging;
namespace OpenMetaverse.TestClient
@@ -98,7 +99,7 @@ namespace OpenMetaverse.TestClient
if (lowfilename.EndsWith(".tga"))
bitmap = LoadTGAClass.LoadTGA(fileName);
else
bitmap = (Bitmap)System.DrawingCore.Image.FromFile(fileName);
bitmap = (Bitmap)Image.FromFile(fileName);
int oldwidth = bitmap.Width;
int oldheight = bitmap.Height;
@@ -108,9 +109,8 @@ namespace OpenMetaverse.TestClient
Bitmap resized = new Bitmap(256, 256, bitmap.PixelFormat);
Graphics graphics = Graphics.FromImage(resized);
graphics.SmoothingMode = System.DrawingCore.Drawing2D.SmoothingMode.HighQuality;
graphics.InterpolationMode =
System.DrawingCore.Drawing2D.InterpolationMode.HighQualityBicubic;
graphics.SmoothingMode = SmoothingMode.HighQuality;
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
graphics.DrawImage(bitmap, 0, 0, 256, 256);
bitmap.Dispose();
@@ -129,9 +129,9 @@ namespace OpenMetaverse.TestClient
Bitmap resized = new Bitmap(newwidth, newheight, bitmap.PixelFormat);
Graphics graphics = Graphics.FromImage(resized);
graphics.SmoothingMode = System.DrawingCore.Drawing2D.SmoothingMode.HighQuality;
graphics.SmoothingMode = SmoothingMode.HighQuality;
graphics.InterpolationMode =
System.DrawingCore.Drawing2D.InterpolationMode.HighQualityBicubic;
InterpolationMode.HighQualityBicubic;
graphics.DrawImage(bitmap, 0, 0, newwidth, newheight);
bitmap.Dispose();