diff --git a/CI/azure-pipelines-build.yml b/CI/azure-pipelines-build.yml index 642f412..112b8d0 100644 --- a/CI/azure-pipelines-build.yml +++ b/CI/azure-pipelines-build.yml @@ -17,6 +17,13 @@ parameters: displayName: NuGet-Version type: string default: '0' + +# Required Pipeline Variables for Code Signing: +# - AZURE_KEY_VAULT_URL: Azure Key Vault URL (e.g., https://your-vault.vault.azure.net/) +# - AZURE_KEY_VAULT_APPLICATION_ID: Azure AD Application Client ID +# - AZURE_KEY_VAULT_CLIENT_SECRET: Azure AD Application Client Secret (Pipeline Secret Variable) +# - AZURE_KEY_VAULT_TENANT_ID: Azure AD Tenant ID +# - AZURE_KEY_VAULT_CERTIFICATE_NAME: Name of the certificate in Key Vault variables: - group: IronDrawingVersions @@ -36,6 +43,9 @@ variables: value: ${{ parameters.inputNuGetVersion }}-prerelease ${{ if eq(parameters.preRelease, false) }}: value: ${{ parameters.inputNuGetVersion }} + + - name: TimestampUrl + value: http://timestamp.digicert.com # Build Trigger trigger: branches: diff --git a/CI/job_templates/deploy_drawing_libraries.yml b/CI/job_templates/deploy_drawing_libraries.yml index 8c6c702..2186dd4 100644 --- a/CI/job_templates/deploy_drawing_libraries.yml +++ b/CI/job_templates/deploy_drawing_libraries.yml @@ -7,11 +7,6 @@ jobs: - job: DeployDrawingLibraries steps: - checkout: none - - task: DownloadSecureFile@1 - displayName: Download IronBarCode Code-Signing Cert - name: DownloadSigningCert - inputs: - secureFile: 'ironcert.pfx' - task: DownloadPipelineArtifact@2 inputs: buildType: 'current' @@ -35,14 +30,28 @@ jobs: buildProperties: 'version=${{ parameters.NuGetVersion }};IncludeSymbols=true;SymbolPackageFormat=snupkg' includeSymbols: true # Sign NuGet Packages - - task: NuGetCommand@2 - displayName: Sign IronDrawing NuGet Package + - task: DotNetCoreCLI@2 + displayName: INSTALL NuGetKeyVaultSignTool inputs: - command: 'custom' - arguments: >- - sign $(Build.ArtifactStagingDirectory)\IronSoftware.System.Drawing.${{ parameters.NuGetVersion }}.symbols.nupkg - -CertificatePath $(Agent.TempDirectory)\ironcert.pfx - -Timestamper http://timestamp.digicert.com -NonInteractive -CertificatePassword $(CertificatePassword) + command: custom + custom: tool + arguments: install --global NuGetKeyVaultSignTool + - task: PowerShell@2 + displayName: Sign IronDrawing NuGet Package with NuGetKeyVaultSignTool + inputs: + targetType: 'inline' + script: | + NuGetKeyVaultSignTool sign "$(Build.ArtifactStagingDirectory)\IronSoftware.System.Drawing.${{ parameters.NuGetVersion }}.symbols.nupkg" ` + --azure-key-vault-url "$(AZURE_KEY_VAULT_URL)" ` + --azure-key-vault-client-id "$(AZURE_KEY_VAULT_APPLICATION_ID)" ` + --azure-key-vault-client-secret "$(AZURE_KEY_VAULT_CLIENT_SECRET)" ` + --azure-key-vault-tenant-id "$(AZURE_KEY_VAULT_TENANT_ID)" ` + --azure-key-vault-certificate "$(AZURE_KEY_VAULT_CERTIFICATE_NAME)" ` + --timestamp-rfc3161 "$(TimestampUrl)" ` + --timestamp-digest sha256 ` + --file-digest sha256 ` + --verbose + - task: NuGetCommand@2 inputs: command: 'push' diff --git a/CI/step_templates/sign_drawing_libraries_dll.yml b/CI/step_templates/sign_drawing_libraries_dll.yml index d9df590..5de195a 100644 --- a/CI/step_templates/sign_drawing_libraries_dll.yml +++ b/CI/step_templates/sign_drawing_libraries_dll.yml @@ -1,17 +1,47 @@ steps: -- task: CmdLine@2 +# Install .NET 8 SDK for AzureSignTool +- task: UseDotNet@2 + displayName: INSTALL .NET 8 SDK + inputs: + packageType: sdk + version: 8.x +- task: DotNetCoreCLI@2 + displayName: INSTALL AzureSignTool + inputs: + command: custom + custom: tool + arguments: install --global AzureSignTool +- task: PowerShell@2 displayName: 'Sign IronSoftware.Drawing.Common.dll .NET6' inputs: workingDirectory: 'bin\$(Configuration)\netstandard2.0' - script: >- - $(Build.SourcesDirectory)\NuGet\signtool.exe sign - /v /d IronDrawing /f $(Agent.TempDirectory)/ironcert.pfx /p $(CertificatePassword) - /t http://timestamp.digicert.com /fd SHA256 "IronSoftware.Drawing.Common.dll" -- task: CmdLine@2 + targetType: 'inline' + script: | + azuresigntool sign ` + --azure-key-vault-url "$(AZURE_KEY_VAULT_URL)" ` + --azure-key-vault-client-id "$(AZURE_KEY_VAULT_APPLICATION_ID)" ` + --azure-key-vault-client-secret "$(AZURE_KEY_VAULT_CLIENT_SECRET)" ` + --azure-key-vault-tenant-id "$(AZURE_KEY_VAULT_TENANT_ID)" ` + --azure-key-vault-certificate "$(AZURE_KEY_VAULT_CERTIFICATE_NAME)" ` + --timestamp-rfc3161 "$(TimestampUrl)" ` + --timestamp-digest sha256 ` + --file-digest sha256 ` + --verbose ` + "IronSoftware.Drawing.Common.dll" +- task: PowerShell@2 displayName: 'Sign IronSoftware.Drawing.Common.dll .NET6' inputs: workingDirectory: 'bin\$(Configuration)\net60' - script: >- - $(Build.SourcesDirectory)\NuGet\signtool.exe sign - /v /d IronDrawing /f $(Agent.TempDirectory)/ironcert.pfx /p $(CertificatePassword) - /t http://timestamp.digicert.com /fd SHA256 "IronSoftware.Drawing.Common.dll" \ No newline at end of file + targetType: 'inline' + script: | + azuresigntool sign ` + --azure-key-vault-url "$(AZURE_KEY_VAULT_URL)" ` + --azure-key-vault-client-id "$(AZURE_KEY_VAULT_APPLICATION_ID)" ` + --azure-key-vault-client-secret "$(AZURE_KEY_VAULT_CLIENT_SECRET)" ` + --azure-key-vault-tenant-id "$(AZURE_KEY_VAULT_TENANT_ID)" ` + --azure-key-vault-certificate "$(AZURE_KEY_VAULT_CERTIFICATE_NAME)" ` + --timestamp-rfc3161 "$(TimestampUrl)" ` + --timestamp-digest sha256 ` + --file-digest sha256 ` + --verbose ` + "IronSoftware.Drawing.Common.dll" \ No newline at end of file diff --git a/IronSoftware.Drawing/IronSoftware.Drawing.Common/AnyBitmap.cs b/IronSoftware.Drawing/IronSoftware.Drawing.Common/AnyBitmap.cs index 6a756a6..022b2a0 100644 --- a/IronSoftware.Drawing/IronSoftware.Drawing.Common/AnyBitmap.cs +++ b/IronSoftware.Drawing/IronSoftware.Drawing.Common/AnyBitmap.cs @@ -469,9 +469,9 @@ public static AnyBitmap FromSpan(ReadOnlySpan span) } /// - /// Create a new Bitmap from a a Byte Span. + /// Create a new Bitmap from a a byte span. /// - /// A Byte Span of image data in any common format. + /// A byte span of image data in any common format. /// Determine whether to load as its original pixel format or Rgba32. public static AnyBitmap FromSpan(ReadOnlySpan span, bool preserveOriginalFormat) { @@ -479,18 +479,18 @@ public static AnyBitmap FromSpan(ReadOnlySpan span, bool preserveOriginalF } /// - /// Create a new Bitmap from a a Byte Array. + /// Create a new Bitmap from a a byte array. /// - /// A ByteArray of image data in any common format. + /// A byte array of image data in any common format. public static AnyBitmap FromBytes(byte[] bytes) { return new AnyBitmap(bytes, true); } /// - /// Create a new Bitmap from a a Byte Array. + /// Create a new Bitmap from a a byte array. /// - /// A ByteArray of image data in any common format. + /// A byte array of image data in any common format. /// Determine whether to load as its original pixel format or Rgba32. public static AnyBitmap FromBytes(byte[] bytes, bool preserveOriginalFormat) { @@ -555,7 +555,7 @@ public AnyBitmap(ReadOnlySpan span) } /// - /// Construct a new Bitmap from binary data (byte span). + /// Construct a new Bitmap out of binary data with a byte span. /// /// A byte span of image data in any common format. /// Determine whether to load as its original pixel format or Rgba32. @@ -577,9 +577,9 @@ public AnyBitmap(byte[] bytes) } /// - /// Construct a new Bitmap from binary data (bytes). + /// Construct a new Bitmap out of binary data with a byte array. /// - /// A ByteArray of image data in any common format. + /// A byte array of image data in any common format. /// Determine whether to load as its original pixel format or Rgba32. /// /// @@ -670,7 +670,7 @@ public AnyBitmap(string file, bool preserveOriginalFormat) } /// - /// Construct a new Bitmap from a Uri + /// Construct a new Bitmap from a Uri. /// /// The uri of the image. /// @@ -689,7 +689,7 @@ public AnyBitmap(Uri uri) } /// - /// Construct a new Bitmap from a Uri + /// Construct a new Bitmap from a Uri. /// /// The uri of the image. /// Determine whether to load as its original pixel format or Rgba32. @@ -709,7 +709,7 @@ public AnyBitmap(Uri uri, bool preserveOriginalFormat) } /// - /// Construct a new Bitmap from width and height + /// Construct a new Bitmap from width and height. /// /// Width of new AnyBitmap /// Height of new AnyBitmap @@ -757,7 +757,7 @@ public static AnyBitmap FromFile(string file, bool preserveOriginalFormat) } /// - /// Construct a new Bitmap from a Uri + /// Construct a new Bitmap from a Uri. /// /// The uri of the image. /// @@ -778,7 +778,7 @@ public static async Task FromUriAsync(Uri uri) } /// - /// Construct a new Bitmap from a Uri + /// Construct a new Bitmap from a Uri. /// /// The uri of the image. /// Determine whether to load as its original pixel format or Rgba32. @@ -823,7 +823,7 @@ public static AnyBitmap FromUri(Uri uri) } /// - /// Construct a new Bitmap from a Uri + /// Construct a new Bitmap from a Uri. /// /// The uri of the image. /// Determine whether to load as its original pixel format or Rgba32. diff --git a/NuGet/IronSoftware.Drawing.nuspec b/NuGet/IronSoftware.Drawing.nuspec index 7183b4e..8bcfaff 100644 --- a/NuGet/IronSoftware.Drawing.nuspec +++ b/NuGet/IronSoftware.Drawing.nuspec @@ -30,6 +30,7 @@ Key library features include: IronSoftware.Drawing can be used within C#, VB.NET, F#, ASP.NET projects, MVC, Web Services, Console & Desktop Applications. Supports: +* .NET 9 * .NET 8 * .NET 7 * .NET 6 @@ -39,9 +40,7 @@ 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. - - Updates internal dependencies. - - Fixes the issue of some images are auto-rotated when loading as AnyBitmap. - - Adds an option called preserveOriginalFormat to download input image as Rgba32 via AnyBitmap. + - Updates internal dependencies. Copyright © Iron Software 2022-2025 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 diff --git a/NuGet/README.md b/NuGet/README.md index 7143c54..f997306 100644 --- a/NuGet/README.md +++ b/NuGet/README.md @@ -7,7 +7,7 @@ If you would like to contribute to this open-source project, please visit the public GitHub and open a branch [here](https://github.com/iron-software/IronSoftware.System.Drawing/). ## Cross platform support compatibility with: -- .NET 8, .NET 7, .NET 6, .NET 5, .NET Core, Standard, and Framework +- .NET 9, .NET 8, .NET 7, .NET 6, .NET 5, .NET Core, Standard, and Framework - Windows, macOS, Linux, Docker, Azure, and AWS ## IronSoftware.Drawing Features: diff --git a/NuGet/README.txt b/NuGet/README.txt index d10b7d1..dcedcd4 100644 --- a/NuGet/README.txt +++ b/NuGet/README.txt @@ -3,7 +3,7 @@ IronSoftware.Drawing is an free and open-source library originally developed by Cross Platform Compatibility ======================== * C#, F#, and VB.NET -* .NET 8, .NET 7, .NET 6, .NET 5, .NET Core, Standard, and Framework +* .NET 9, .NET 8, .NET 7, .NET 6, .NET 5, .NET Core, Standard, and Framework * Console, Web, and Desktop Apps * Windows, macOs, Linux, Docker, Azure, and AWS * Microsoft Visual Studio or Jetbrains ReSharper & Rider diff --git a/README.md b/README.md index 7b9de65..1a1ab12 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ | `SkiaSharp.SKPointI` | ✅ | ✅ | | | ### IronSoftware.Drawing has cross platform support compatibility with: -- .NET 8, .NET 7, .NET 6, .NET 5, .NET Core, Standard, and Framework +- .NET 9, .NET 8, .NET 7, .NET 6, .NET 5, .NET Core, Standard, and Framework - Windows, macOS, Linux, Docker, Azure, and AWS ## Using IronSoftware.Drawing