Skip to content

Commit aeaba83

Browse files
committed
Removed System.Drawing references
1 parent 871bf4e commit aeaba83

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

src/Spectrogram.Tests/ColormapValues.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using NUnit.Framework;
22
using System;
3-
using System.Drawing;
43
using SkiaSharp;
54

65
namespace Spectrogram.Tests
@@ -49,13 +48,13 @@ public void Test_colorLookup_integerMatchesTriplet()
4948
{
5049
byte[] bytes = BitConverter.GetBytes(ints[i]);
5150

52-
Color color1 = Color.FromArgb(bytes[2], bytes[1], bytes[0]);
51+
SKColor color1 = new SKColor(bytes[2], bytes[1], bytes[0]);
5352

54-
Color color2 = Color.FromArgb(rgb[i, 0], rgb[i, 1], rgb[i, 2]);
53+
SKColor color2 = new SKColor(rgb[i, 0], rgb[i, 1], rgb[i, 2]);
5554

56-
Assert.AreEqual(color2.R, color1.R, 1);
57-
Assert.AreEqual(color2.G, color1.G, 1);
58-
Assert.AreEqual(color2.B, color1.B, 1);
55+
Assert.AreEqual(color2.Red, color1.Red, 1);
56+
Assert.AreEqual(color2.Green, color1.Green, 1);
57+
Assert.AreEqual(color2.Blue, color1.Blue, 1);
5958
}
6059
}
6160

src/Spectrogram.Tests/Mel.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
using NUnit.Framework;
22
using System;
3-
using System.Collections.Generic;
4-
using System.Drawing;
5-
using System.Drawing.Imaging;
6-
using System.Text;
73
using SkiaSharp;
84

95
namespace Spectrogram.Tests

src/Spectrogram/Spectrogram.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131

3232
<ItemGroup>
3333
<PackageReference Include="FftSharp" Version="2.1.0" />
34-
<PackageReference Include="runtime.osx.10.10-x64.CoreCompat.System.Drawing" Version="5.8.64" Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'" />
3534
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
3635
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3736
<PrivateAssets>all</PrivateAssets>

0 commit comments

Comments
 (0)