From 36105c902d5aef3ba6f60e11b2e8c26daf0c4117 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Sun, 12 Dec 2021 23:39:41 +1100 Subject: [PATCH 1/2] Remove netstandard 1.3 target --- README.md | 2 +- .../Tiff/Compression/Compressors/DeflateCompressor.cs | 7 ------- src/ImageSharp/ImageSharp.csproj | 6 +++--- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index ab16bbb76a..fdf14b4963 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ ImageSharp is a new, fully featured, fully managed, cross-platform, 2D graphics ImageSharp is designed from the ground up to be flexible and extensible. The library provides API endpoints for common image processing operations and the building blocks to allow for the development of additional operations. -Built against [.NET Standard 1.3](https://docs.microsoft.com/en-us/dotnet/standard/net-standard), ImageSharp can be used in device, cloud, and embedded/IoT scenarios. +Built against [.NET Standard 2.0](https://docs.microsoft.com/en-us/dotnet/standard/net-standard), ImageSharp can be used in device, cloud, and embedded/IoT scenarios. ## License diff --git a/src/ImageSharp/Formats/Tiff/Compression/Compressors/DeflateCompressor.cs b/src/ImageSharp/Formats/Tiff/Compression/Compressors/DeflateCompressor.cs index 225036f909..c240c06ef6 100644 --- a/src/ImageSharp/Formats/Tiff/Compression/Compressors/DeflateCompressor.cs +++ b/src/ImageSharp/Formats/Tiff/Compression/Compressors/DeflateCompressor.cs @@ -43,15 +43,8 @@ public override void CompressStrip(Span rows, int height) } int size = (int)this.memoryStream.Position; - -#if !NETSTANDARD1_3 byte[] buffer = this.memoryStream.GetBuffer(); this.Output.Write(buffer, 0, size); -#else - this.memoryStream.SetLength(size); - this.memoryStream.Position = 0; - this.memoryStream.CopyTo(this.Output); -#endif } /// diff --git a/src/ImageSharp/ImageSharp.csproj b/src/ImageSharp/ImageSharp.csproj index afe10b1f9c..0a75c06db6 100644 --- a/src/ImageSharp/ImageSharp.csproj +++ b/src/ImageSharp/ImageSharp.csproj @@ -23,12 +23,12 @@ - net6.0;net5.0;netcoreapp3.1;netcoreapp2.1;netstandard2.1;netstandard2.0;netstandard1.3;net472 + net6.0;net5.0;netcoreapp3.1;netcoreapp2.1;netstandard2.1;netstandard2.0;net472 - net5.0;netcoreapp3.1;netcoreapp2.1;netstandard2.1;netstandard2.0;netstandard1.3;net472 + net5.0;netcoreapp3.1;netcoreapp2.1;netstandard2.1;netstandard2.0;net472 @@ -38,7 +38,7 @@ - netcoreapp3.1;netcoreapp2.1;netstandard2.1;netstandard2.0;netstandard1.3;net472 + netcoreapp3.1;netcoreapp2.1;netstandard2.1;netstandard2.0;net472 From 1afcb4cd84b072316c287fc1dc216bc23c097835 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Mon, 13 Dec 2021 09:53:44 +1100 Subject: [PATCH 2/2] Update Guard.cs --- src/ImageSharp/Common/Helpers/Guard.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/ImageSharp/Common/Helpers/Guard.cs b/src/ImageSharp/Common/Helpers/Guard.cs index 0b5cc21cb8..0f6efcb3c4 100644 --- a/src/ImageSharp/Common/Helpers/Guard.cs +++ b/src/ImageSharp/Common/Helpers/Guard.cs @@ -2,9 +2,6 @@ // Licensed under the Apache License, Version 2.0. using System; -#if NETSTANDARD1_3 -using System.Reflection; -#endif using System.Runtime.CompilerServices; using SixLabors.ImageSharp; @@ -22,11 +19,7 @@ internal static partial class Guard [MethodImpl(InliningOptions.ShortMethod)] public static void MustBeValueType(TValue value, string parameterName) { - if (value.GetType() -#if NETSTANDARD1_3 - .GetTypeInfo() -#endif - .IsValueType) + if (value.GetType().IsValueType) { return; }