Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CI/azure-pipelines-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
Expand Down
33 changes: 21 additions & 12 deletions CI/job_templates/deploy_drawing_libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
Expand Down
50 changes: 40 additions & 10 deletions CI/step_templates/sign_drawing_libraries_dll.yml
Original file line number Diff line number Diff line change
@@ -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"
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"
30 changes: 15 additions & 15 deletions IronSoftware.Drawing/IronSoftware.Drawing.Common/AnyBitmap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -469,28 +469,28 @@ public static AnyBitmap FromSpan(ReadOnlySpan<byte> span)
}

/// <summary>
/// Create a new Bitmap from a a Byte Span.
/// Create a new Bitmap from a a byte span.
/// </summary>
/// <param name="span">A Byte Span of image data in any common format.</param>
/// <param name="span">A byte span of image data in any common format.</param>
/// <param name="preserveOriginalFormat">Determine whether to load <see cref="SixLabors.ImageSharp.Image"/> as its original pixel format or Rgba32.</param>
public static AnyBitmap FromSpan(ReadOnlySpan<byte> span, bool preserveOriginalFormat)
{
return new AnyBitmap(span, preserveOriginalFormat);
}

/// <summary>
/// Create a new Bitmap from a a Byte Array.
/// Create a new Bitmap from a a byte array.
/// </summary>
/// <param name="bytes">A ByteArray of image data in any common format.</param>
/// <param name="bytes">A byte array of image data in any common format.</param>
public static AnyBitmap FromBytes(byte[] bytes)
{
return new AnyBitmap(bytes, true);
}

/// <summary>
/// Create a new Bitmap from a a Byte Array.
/// Create a new Bitmap from a a byte array.
/// </summary>
/// <param name="bytes">A ByteArray of image data in any common format.</param>
/// <param name="bytes">A byte array of image data in any common format.</param>
/// <param name="preserveOriginalFormat">Determine whether to load <see cref="SixLabors.ImageSharp.Image"/> as its original pixel format or Rgba32.</param>
public static AnyBitmap FromBytes(byte[] bytes, bool preserveOriginalFormat)
{
Expand Down Expand Up @@ -555,7 +555,7 @@ public AnyBitmap(ReadOnlySpan<byte> span)
}

/// <summary>
/// Construct a new Bitmap from binary data (byte span).
/// Construct a new Bitmap out of binary data with a byte span.
/// </summary>
/// <param name="span">A byte span of image data in any common format.</param>
/// <param name="preserveOriginalFormat">Determine whether to load <see cref="SixLabors.ImageSharp.Image"/> as its original pixel format or Rgba32.</param>
Expand All @@ -577,9 +577,9 @@ public AnyBitmap(byte[] bytes)
}

/// <summary>
/// Construct a new Bitmap from binary data (bytes).
/// Construct a new Bitmap out of binary data with a byte array.
/// </summary>
/// <param name="bytes">A ByteArray of image data in any common format.</param>
/// <param name="bytes">A byte array of image data in any common format.</param>
/// <param name="preserveOriginalFormat">Determine whether to load <see cref="SixLabors.ImageSharp.Image"/> as its original pixel format or Rgba32.</param>
/// <seealso cref="FromBytes(byte[], bool)"/>
/// <seealso cref="AnyBitmap"/>
Expand Down Expand Up @@ -670,7 +670,7 @@ public AnyBitmap(string file, bool preserveOriginalFormat)
}

/// <summary>
/// Construct a new Bitmap from a Uri
/// Construct a new Bitmap from a Uri.
/// </summary>
/// <param name="uri">The uri of the image.</param>
/// <seealso cref="FromUriAsync(Uri)"/>
Expand All @@ -689,7 +689,7 @@ public AnyBitmap(Uri uri)
}

/// <summary>
/// Construct a new Bitmap from a Uri
/// Construct a new Bitmap from a Uri.
/// </summary>
/// <param name="uri">The uri of the image.</param>
/// <param name="preserveOriginalFormat">Determine whether to load <see cref="SixLabors.ImageSharp.Image"/> as its original pixel format or Rgba32.</param>
Expand All @@ -709,7 +709,7 @@ public AnyBitmap(Uri uri, bool preserveOriginalFormat)
}

/// <summary>
/// Construct a new Bitmap from width and height
/// Construct a new Bitmap from width and height.
/// </summary>
/// <param name="width">Width of new AnyBitmap</param>
/// <param name="height">Height of new AnyBitmap</param>
Expand Down Expand Up @@ -757,7 +757,7 @@ public static AnyBitmap FromFile(string file, bool preserveOriginalFormat)
}

/// <summary>
/// Construct a new Bitmap from a Uri
/// Construct a new Bitmap from a Uri.
/// </summary>
/// <param name="uri">The uri of the image.</param>
/// <returns></returns>
Expand All @@ -778,7 +778,7 @@ public static async Task<AnyBitmap> FromUriAsync(Uri uri)
}

/// <summary>
/// Construct a new Bitmap from a Uri
/// Construct a new Bitmap from a Uri.
/// </summary>
/// <param name="uri">The uri of the image.</param>
/// <param name="preserveOriginalFormat">Determine whether to load <see cref="SixLabors.ImageSharp.Image"/> as its original pixel format or Rgba32.</param>
Expand Down Expand Up @@ -823,7 +823,7 @@ public static AnyBitmap FromUri(Uri uri)
}

/// <summary>
/// Construct a new Bitmap from a Uri
/// Construct a new Bitmap from a Uri.
/// </summary>
/// <param name="uri">The uri of the image.</param>
/// <param name="preserveOriginalFormat">Determine whether to load <see cref="SixLabors.ImageSharp.Image"/> as its original pixel format or Rgba32.</param>
Expand Down
5 changes: 2 additions & 3 deletions NuGet/IronSoftware.Drawing.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -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 &amp; Desktop Applications.

Supports:
* .NET 9
* .NET 8
* .NET 7
* .NET 6
Expand All @@ -39,9 +40,7 @@ Supports:

For general support and technical inquiries, please email us at: support@ironsoftware.com</description>
<summary>IronSoftware.System.Drawing is an open-source solution for .NET developers to replace System.Drawing.Common with a universal and flexible library.</summary>
<releaseNotes>- 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.</releaseNotes>
<releaseNotes>- Updates internal dependencies.</releaseNotes>
<copyright>Copyright © Iron Software 2022-2025</copyright>
<tags>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</tags>
<repository type="git" url="https://github.com/iron-software/IronSoftware.Drawing.Common" commit="$commit$" />
Expand Down
2 changes: 1 addition & 1 deletion NuGet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion NuGet/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading