Skip to content

Commit b5c447d

Browse files
Merge pull request #122 from iron-software/releases/2024.12
[master] Prepare for December release
2 parents ab0e303 + 46b26d4 commit b5c447d

9 files changed

Lines changed: 467 additions & 432 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL Advanced"
13+
14+
on:
15+
push:
16+
branches: [ "develop", "master" ]
17+
pull_request:
18+
branches: [ "develop", "master" ]
19+
schedule:
20+
- cron: '38 9 * * 4'
21+
22+
jobs:
23+
analyze:
24+
name: Analyze (${{ matrix.language }})
25+
# Runner size impacts CodeQL analysis time. To learn more, please see:
26+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
27+
# - https://gh.io/supported-runners-and-hardware-resources
28+
# - https://gh.io/using-larger-runners (GitHub.com only)
29+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
30+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31+
permissions:
32+
# required for all workflows
33+
security-events: write
34+
35+
# required to fetch internal or private CodeQL packs
36+
packages: read
37+
38+
# only required for workflows in private repositories
39+
actions: read
40+
contents: read
41+
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
include:
46+
- language: csharp
47+
build-mode: none
48+
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
49+
# Use `c-cpp` to analyze code written in C, C++ or both
50+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
51+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
52+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
53+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
54+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
55+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
56+
steps:
57+
- name: Checkout repository
58+
uses: actions/checkout@v4
59+
60+
# Initializes the CodeQL tools for scanning.
61+
- name: Initialize CodeQL
62+
uses: github/codeql-action/init@v3
63+
with:
64+
languages: ${{ matrix.language }}
65+
build-mode: ${{ matrix.build-mode }}
66+
# If you wish to specify custom queries, you can do so here or in a config file.
67+
# By default, queries listed here will override any specified in a config file.
68+
# Prefix the list here with "+" to use these queries and those in the config file.
69+
70+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
71+
# queries: security-extended,security-and-quality
72+
73+
# If the analyze step fails for one of the languages you are analyzing with
74+
# "We were unable to automatically build your code", modify the matrix above
75+
# to set the build mode to "manual" for that language. Then modify this step
76+
# to build your code.
77+
# ℹ️ Command-line programs to run using the OS shell.
78+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
79+
- if: matrix.build-mode == 'manual'
80+
shell: bash
81+
run: |
82+
echo 'If you are using a "manual" build mode for one or more of the' \
83+
'languages you are analyzing, replace this with the commands to build' \
84+
'your code, for example:'
85+
echo ' make bootstrap'
86+
echo ' make release'
87+
exit 1
88+
89+
- name: Perform CodeQL Analysis
90+
uses: github/codeql-action/analyze@v3
91+
with:
92+
category: "/language:${{matrix.language}}"

CI/job_templates/build_drawing_libraries.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,6 @@ jobs:
3131
- checkout: self
3232
displayName: Checkout IronSoftware.Drawing repository
3333
lfs: true
34-
- task: UseDotNet@2
35-
displayName: 'Install .Netcoreapp3.1 Core sdk'
36-
inputs:
37-
packageType: 'sdk'
38-
version: '3.x'
39-
- task: UseDotNet@2
40-
displayName: 'Install .NET5 sdk'
41-
inputs:
42-
packageType: 'sdk'
43-
version: '5.x'
44-
- task: UseDotNet@2
45-
displayName: 'Install .NET6 sdk'
46-
inputs:
47-
packageType: 'sdk'
48-
version: '6.x'
49-
- task: UseDotNet@2
50-
displayName: 'Install .NET7 sdk'
51-
inputs:
52-
packageType: 'sdk'
53-
version: '7.x'
5434
- task: UseDotNet@2
5535
displayName: 'Install .NET7 sdk'
5636
inputs:

CI/stage_templates/run_tests_on_pool.yml

Lines changed: 9 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -16,75 +16,27 @@ stages:
1616
- script: echo "Skip Unit tests"
1717
- ${{ if eq(parameters.runUnitTests, true) }}:
1818
- ${{ if eq(parameters.OSPlatform, 'Windows') }}:
19-
# Windows .NET 472 x86 Tests
19+
# Windows .NET 48 x86 Tests
2020
- template: ../job_templates/test_drawing_libraries.yml
2121
parameters:
22-
name: UnitTest${{ parameters.OSPlatform }}net472x86
22+
name: UnitTest${{ parameters.OSPlatform }}net48x86
2323
OSPlatform: ${{ parameters.OSPlatform }}
24-
framework: 'net472'
24+
framework: 'net48'
2525
architecture: '.x86'
2626
buildConfiguration: $(Configuration)
27-
# Windows .NET 472 x64 Tests
27+
# Windows .NET 48 x64 Tests
2828
- template: ../job_templates/test_drawing_libraries.yml
2929
parameters:
30-
name: UnitTest${{ parameters.OSPlatform }}net472x64
30+
name: UnitTest${{ parameters.OSPlatform }}net48x64
3131
OSPlatform: ${{ parameters.OSPlatform }}
32-
framework: 'net472'
32+
framework: 'net48'
3333
architecture: ''
3434
buildConfiguration: $(Configuration)
35-
# Windows .NET Core x64 Tests
36-
- template: ../job_templates/test_drawing_libraries.yml
37-
parameters:
38-
name: UnitTest${{ parameters.OSPlatform }}netcore
39-
OSPlatform: ${{ parameters.OSPlatform }}
40-
framework: 'netcoreapp3.1'
41-
architecture: ''
42-
buildConfiguration: $(Configuration)
43-
# Windows .NET Core x86 Tests
44-
- template: ../job_templates/test_drawing_libraries.yml
45-
parameters:
46-
name: UnitTest${{ parameters.OSPlatform }}netcorex86
47-
OSPlatform: ${{ parameters.OSPlatform }}
48-
framework: 'netcoreapp3.1'
49-
architecture: '.x86'
50-
buildConfiguration: $(Configuration)
51-
# Windows .NET 6.0 x86 Tests
52-
- template: ../job_templates/test_drawing_libraries.yml
53-
parameters:
54-
name: UnitTest${{ parameters.OSPlatform }}net60x86
55-
OSPlatform: ${{ parameters.OSPlatform }}
56-
framework: 'net60'
57-
architecture: '.x86'
58-
buildConfiguration: $(Configuration)
59-
# Windows .NET 7.0 x86 Tests
60-
- template: ../job_templates/test_drawing_libraries.yml
61-
parameters:
62-
name: UnitTest${{ parameters.OSPlatform }}net70x86
63-
OSPlatform: ${{ parameters.OSPlatform }}
64-
framework: 'net70'
65-
architecture: '.x86'
66-
buildConfiguration: $(Configuration)
67-
# .NET 5.0 Tests
68-
- template: ../job_templates/test_drawing_libraries.yml
69-
parameters:
70-
name: UnitTest${{ parameters.OSPlatform }}net50
71-
OSPlatform: ${{ parameters.OSPlatform }}
72-
framework: 'net50'
73-
architecture: ''
74-
buildConfiguration: $(Configuration)
75-
# .NET 6.0 x64 Tests
76-
- template: ../job_templates/test_drawing_libraries.yml
77-
parameters:
78-
name: UnitTest${{ parameters.OSPlatform }}net60
79-
OSPlatform: ${{ parameters.OSPlatform }}
80-
framework: 'net60'
81-
architecture: ''
82-
buildConfiguration: $(Configuration)
83-
# .NET 7.0 x64 Tests
35+
# .NET 8.0 Tests
8436
- template: ../job_templates/test_drawing_libraries.yml
8537
parameters:
86-
name: UnitTest${{ parameters.OSPlatform }}net70
38+
name: UnitTest${{ parameters.OSPlatform }}net80
8739
OSPlatform: ${{ parameters.OSPlatform }}
88-
framework: 'net70'
40+
framework: 'net80'
8941
architecture: ''
9042
buildConfiguration: $(Configuration)

IronSoftware.Drawing/IronSoftware.Drawing.Common.Tests/IronSoftware.Drawing.Common.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;netcoreapp3.1;net50;net60;net70</TargetFrameworks>
4+
<TargetFrameworks>net48;net80</TargetFrameworks>
55
<LangVersion>latest</LangVersion>
66
<CheckEolTargetFramework>false</CheckEolTargetFramework>
77
<IsPackable>false</IsPackable>

IronSoftware.Drawing/IronSoftware.Drawing.Common/AnyBitmap.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ namespace IronSoftware.Drawing
4444
/// self-memory-managing and does not need to be explicitly 'used'
4545
/// or 'disposed'.</para>
4646
/// </summary>
47-
public partial class AnyBitmap : IDisposable
47+
public partial class AnyBitmap : IDisposable, IAnyImage
4848
{
4949
private bool _disposed = false;
5050
private Image Image { get; set; }
@@ -182,6 +182,12 @@ public byte[] ExportBytes(
182182
return byteArray;
183183
}
184184

185+
/// <inheritdoc/>
186+
public byte[] ExportBytesAsJpg()
187+
{
188+
return this.ExportBytes(ImageFormat.Jpeg);
189+
}
190+
185191
/// <summary>
186192
/// Exports the Bitmap as a file encoded in the
187193
/// <see cref="ImageFormat"/> of your choice.
Lines changed: 55 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,55 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
2-
3-
<PropertyGroup>
4-
<AssemblyOriginatorKeyFile>IronSoftware.Drawing.Common.snk</AssemblyOriginatorKeyFile>
5-
<Configurations>Debug;Release</Configurations>
6-
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
7-
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
8-
<EmbedUntrackedSources>true</EmbedUntrackedSources>
9-
<GenerateDocumentationFile>true</GenerateDocumentationFile>
10-
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
11-
<LangVersion>latest</LangVersion>
12-
<NoWarn>CS8002</NoWarn>
13-
<Platforms>AnyCPU</Platforms>
14-
<SignAssembly>true</SignAssembly>
15-
<TargetFrameworks>netstandard2.0;netstandard2.1;net60</TargetFrameworks>
16-
<TransformOnBuild>true</TransformOnBuild>
17-
</PropertyGroup>
18-
19-
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard2.0|AnyCPU'">
20-
<PlatformTarget>AnyCPU</PlatformTarget>
21-
<DefineConstants>DEBUG;TRACE</DefineConstants>
22-
</PropertyGroup>
23-
24-
<ItemGroup>
25-
<PackageReference Include="BitMiracle.LibTiff.NET" Version="2.4.649" />
26-
<PackageReference Include="Microsoft.Maui.Graphics" Version="7.0.92" />
27-
<PackageReference Include="SkiaSharp" Version="2.88.7" />
28-
<PackageReference Include="SkiaSharp.Svg" Version="1.60.0" />
29-
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
30-
<PackageReference Include="System.Memory" Version="4.5.5" />
31-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
32-
</ItemGroup>
33-
34-
<Choose>
35-
<When Condition="'$(TargetFramework)' == 'net60'">
36-
<ItemGroup>
37-
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.5" />
38-
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="2.1.4" />
39-
</ItemGroup>
40-
</When>
41-
<Otherwise>
42-
<ItemGroup>
43-
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.9" />
44-
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0" />
45-
</ItemGroup>
46-
</Otherwise>
47-
</Choose>
48-
49-
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard2.0|AnyCPU'">
50-
<DebugType>portable</DebugType>
51-
<DebugSymbols>true</DebugSymbols>
52-
</PropertyGroup>
53-
54-
</Project>
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<AssemblyOriginatorKeyFile>IronSoftware.Drawing.Common.snk</AssemblyOriginatorKeyFile>
5+
<Configurations>Debug;Release</Configurations>
6+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
7+
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
8+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
9+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
10+
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
11+
<LangVersion>latest</LangVersion>
12+
<NoWarn>CS8002</NoWarn>
13+
<Platforms>AnyCPU</Platforms>
14+
<SignAssembly>true</SignAssembly>
15+
<TargetFrameworks>netstandard2.0;net60</TargetFrameworks>
16+
<TransformOnBuild>true</TransformOnBuild>
17+
</PropertyGroup>
18+
19+
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard2.0|AnyCPU'">
20+
<PlatformTarget>AnyCPU</PlatformTarget>
21+
<DefineConstants>DEBUG;TRACE</DefineConstants>
22+
</PropertyGroup>
23+
24+
<ItemGroup>
25+
<PackageReference Include="BitMiracle.LibTiff.NET" Version="2.4.649" />
26+
<PackageReference Include="Microsoft.Maui.Graphics" Version="7.0.92" />
27+
<PackageReference Include="SkiaSharp" Version="2.88.7" />
28+
<PackageReference Include="IronSoftware.Drawing.Abstractions" Version="2024.11.8" />
29+
<PackageReference Include="SkiaSharp.Svg" Version="1.60.0" />
30+
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
31+
<PackageReference Include="System.Memory" Version="4.5.5" />
32+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
33+
</ItemGroup>
34+
35+
<Choose>
36+
<When Condition="'$(TargetFramework)' == 'net60'">
37+
<ItemGroup>
38+
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.5" />
39+
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="2.1.4" />
40+
</ItemGroup>
41+
</When>
42+
<Otherwise>
43+
<ItemGroup>
44+
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.9" />
45+
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0" />
46+
</ItemGroup>
47+
</Otherwise>
48+
</Choose>
49+
50+
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard2.0|AnyCPU'">
51+
<DebugType>portable</DebugType>
52+
<DebugSymbols>true</DebugSymbols>
53+
</PropertyGroup>
54+
55+
</Project>

IronSoftware.Drawing/nuget.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
<packageSources>
44
<clear />
55
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
6+
<add key="Common" value="https://pkgs.dev.azure.com/ironcoders/IronCommon/_packaging/IronCommon/nuget/v3/index.json" />
67
</packageSources>
78
</configuration>

0 commit comments

Comments
 (0)