diff --git a/CI/job_templates/build_drawing_libraries.yml b/CI/job_templates/build_drawing_libraries.yml index 9160f53..6b77086 100644 --- a/CI/job_templates/build_drawing_libraries.yml +++ b/CI/job_templates/build_drawing_libraries.yml @@ -31,26 +31,6 @@ jobs: - checkout: self displayName: Checkout IronSoftware.Drawing repository lfs: true - - task: UseDotNet@2 - displayName: 'Install .Netcoreapp3.1 Core sdk' - inputs: - packageType: 'sdk' - version: '3.x' - - task: UseDotNet@2 - displayName: 'Install .NET5 sdk' - inputs: - packageType: 'sdk' - version: '5.x' - - task: UseDotNet@2 - displayName: 'Install .NET6 sdk' - inputs: - packageType: 'sdk' - version: '6.x' - - task: UseDotNet@2 - displayName: 'Install .NET7 sdk' - inputs: - packageType: 'sdk' - version: '7.x' - task: UseDotNet@2 displayName: 'Install .NET7 sdk' inputs: diff --git a/CI/stage_templates/run_tests_on_pool.yml b/CI/stage_templates/run_tests_on_pool.yml index 898be51..b2abb23 100644 --- a/CI/stage_templates/run_tests_on_pool.yml +++ b/CI/stage_templates/run_tests_on_pool.yml @@ -32,59 +32,11 @@ stages: framework: 'net472' architecture: '' buildConfiguration: $(Configuration) - # Windows .NET Core x64 Tests - - template: ../job_templates/test_drawing_libraries.yml - parameters: - name: UnitTest${{ parameters.OSPlatform }}netcore - OSPlatform: ${{ parameters.OSPlatform }} - framework: 'netcoreapp3.1' - architecture: '' - buildConfiguration: $(Configuration) - # Windows .NET Core x86 Tests - - template: ../job_templates/test_drawing_libraries.yml - parameters: - name: UnitTest${{ parameters.OSPlatform }}netcorex86 - OSPlatform: ${{ parameters.OSPlatform }} - framework: 'netcoreapp3.1' - architecture: '.x86' - buildConfiguration: $(Configuration) - # Windows .NET 6.0 x86 Tests - - template: ../job_templates/test_drawing_libraries.yml - parameters: - name: UnitTest${{ parameters.OSPlatform }}net60x86 - OSPlatform: ${{ parameters.OSPlatform }} - framework: 'net60' - architecture: '.x86' - buildConfiguration: $(Configuration) - # Windows .NET 7.0 x86 Tests - - template: ../job_templates/test_drawing_libraries.yml - parameters: - name: UnitTest${{ parameters.OSPlatform }}net70x86 - OSPlatform: ${{ parameters.OSPlatform }} - framework: 'net70' - architecture: '.x86' - buildConfiguration: $(Configuration) - # .NET 5.0 Tests - - template: ../job_templates/test_drawing_libraries.yml - parameters: - name: UnitTest${{ parameters.OSPlatform }}net50 - OSPlatform: ${{ parameters.OSPlatform }} - framework: 'net50' - architecture: '' - buildConfiguration: $(Configuration) - # .NET 6.0 x64 Tests - - template: ../job_templates/test_drawing_libraries.yml - parameters: - name: UnitTest${{ parameters.OSPlatform }}net60 - OSPlatform: ${{ parameters.OSPlatform }} - framework: 'net60' - architecture: '' - buildConfiguration: $(Configuration) - # .NET 7.0 x64 Tests + # .NET 8.0 Tests - template: ../job_templates/test_drawing_libraries.yml parameters: - name: UnitTest${{ parameters.OSPlatform }}net70 + name: UnitTest${{ parameters.OSPlatform }}net80 OSPlatform: ${{ parameters.OSPlatform }} - framework: 'net70' + framework: 'net80' architecture: '' buildConfiguration: $(Configuration) diff --git a/IronSoftware.Drawing/IronSoftware.Drawing.Common.Tests/IronSoftware.Drawing.Common.Tests.csproj b/IronSoftware.Drawing/IronSoftware.Drawing.Common.Tests/IronSoftware.Drawing.Common.Tests.csproj index a53beb4..ba9c9e3 100644 --- a/IronSoftware.Drawing/IronSoftware.Drawing.Common.Tests/IronSoftware.Drawing.Common.Tests.csproj +++ b/IronSoftware.Drawing/IronSoftware.Drawing.Common.Tests/IronSoftware.Drawing.Common.Tests.csproj @@ -1,7 +1,7 @@  - net472;netcoreapp3.1;net50;net60;net70 + net472;net80 latest false false diff --git a/IronSoftware.Drawing/IronSoftware.Drawing.Common/AnyBitmap.cs b/IronSoftware.Drawing/IronSoftware.Drawing.Common/AnyBitmap.cs index 4a6c546..03595eb 100644 --- a/IronSoftware.Drawing/IronSoftware.Drawing.Common/AnyBitmap.cs +++ b/IronSoftware.Drawing/IronSoftware.Drawing.Common/AnyBitmap.cs @@ -44,7 +44,7 @@ namespace IronSoftware.Drawing /// self-memory-managing and does not need to be explicitly 'used' /// or 'disposed'. /// - public partial class AnyBitmap : IDisposable + public partial class AnyBitmap : IDisposable, IAnyImage { private bool _disposed = false; private Image Image { get; set; } @@ -182,6 +182,12 @@ public byte[] ExportBytes( return byteArray; } + /// + public byte[] ExportBytesAsJpg() + { + return this.ExportBytes(ImageFormat.Jpeg); + } + /// /// Exports the Bitmap as a file encoded in the /// of your choice. diff --git a/IronSoftware.Drawing/IronSoftware.Drawing.Common/IronSoftware.Drawing.Common.csproj b/IronSoftware.Drawing/IronSoftware.Drawing.Common/IronSoftware.Drawing.Common.csproj index a31eefc..55641ff 100644 --- a/IronSoftware.Drawing/IronSoftware.Drawing.Common/IronSoftware.Drawing.Common.csproj +++ b/IronSoftware.Drawing/IronSoftware.Drawing.Common/IronSoftware.Drawing.Common.csproj @@ -12,7 +12,7 @@ CS8002 AnyCPU true - netstandard2.0;netstandard2.1;net60 + netstandard2.0;net60 true @@ -24,7 +24,8 @@ - + + @@ -34,13 +35,13 @@ - - + + - + diff --git a/IronSoftware.Drawing/nuget.config b/IronSoftware.Drawing/nuget.config index a46022e..a0693a4 100644 --- a/IronSoftware.Drawing/nuget.config +++ b/IronSoftware.Drawing/nuget.config @@ -3,5 +3,6 @@ + diff --git a/NuGet/IronSoftware.Drawing.nuspec b/NuGet/IronSoftware.Drawing.nuspec index d0f5104..cae3054 100644 --- a/NuGet/IronSoftware.Drawing.nuspec +++ b/NuGet/IronSoftware.Drawing.nuspec @@ -39,27 +39,28 @@ Supports: For general support and technical inquiries, please email us at: support@ironsoftware.com IronSoftware.System.Drawing is an open-source solution for .NET developers to replace System.Drawing.Common with a universal and flexible library. - - Efficient compression significantly reduces output TIFF file size (Up to 80%). -- Automatic compression when creating multi-frame TIFFs. -- Fix the issue of exception error thrown when converting Bitmap to AnyBitmap. + - Internal improvement of the library functionality Copyright © Iron Software 2022-2024 Images, Bitmap, SkiaSharp, SixLabors, BitMiracle, Maui, SVG, TIFF, TIF, GIF, JPEG, PNG, Color, Rectangle, Drawing, C#, VB.NET, ASPX, create, render, generate, standard, netstandard2.0, core, netcore - + + - - + + + - + +