Skip to content

Commit

Permalink
Add optional parameters antiAliasing and backgroundColor
Browse files Browse the repository at this point in the history
  • Loading branch information
sungaila committed Dec 28, 2023
1 parent 20b2260 commit e144280
Show file tree
Hide file tree
Showing 112 changed files with 2,628 additions and 1,830 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ body:
attributes:
label: PDFtoImage version
description: Which version of PDFtoImage is affected?
value: 2.4.3
value: 3.0.0
validations:
required: true
- type: dropdown
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/githubpages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Restore
run: dotnet restore src/WebConverter/WebConverter.csproj
- name: Publish
run: dotnet publish src/WebConverter/WebConverter.csproj -c Release -p:PublishProfile=src/WebConverter/Properties/PublishProfiles/PublishSite.pubxml --no-restore
run: dotnet publish src/WebConverter/WebConverter.csproj -c Release -p:PublishProfile=src/WebConverter/Properties/PublishProfiles/PublishSite.pubxml -p:VersionSuffix=ci --no-restore
- name: Create .nojekyll file
run: touch src/WebConverter/bin/Release/net7.0/publish/wwwroot/.nojekyll
- name: Update service-worker-assets.js hashes
Expand Down Expand Up @@ -96,4 +96,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@main
uses: actions/deploy-pages@main
4 changes: 2 additions & 2 deletions .github/workflows/githubpages_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Restore
run: dotnet restore src/WebConverter/WebConverter.csproj
- name: Publish
run: dotnet publish src/WebConverter/WebConverter.csproj -c Release -p:PublishProfile=src/WebConverter/Properties/PublishProfiles/PublishSite.pubxml --no-restore
run: dotnet publish src/WebConverter/WebConverter.csproj -c Release -p:PublishProfile=src/WebConverter/Properties/PublishProfiles/PublishSite.pubxml -p:VersionSuffix=ci --no-restore
- name: Create .nojekyll file
run: touch src/WebConverter/bin/Release/net7.0/publish/wwwroot/.nojekyll
- name: Update service-worker-assets.js hashes
Expand Down Expand Up @@ -99,4 +99,4 @@ jobs:
id: deployment
uses: actions/deploy-pages@main
with:
preview: true
preview: true
2 changes: 1 addition & 1 deletion src/Console/Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<AssemblyName>PDFtoImage.Console</AssemblyName>
<RootNamespace>PDFtoImage.Console</RootNamespace>
<StartupObject>PDFtoImage.Console.Program</StartupObject>
<Version>2.4.3</Version>
<Version>3.0.0</Version>
<Configurations>Debug;Release;ReleaseSigned</Configurations>
</PropertyGroup>

Expand Down
3 changes: 3 additions & 0 deletions src/Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

namespace PDFtoImage.Console
{
#if NET8_0_OR_GREATER
#pragma warning disable CA1510 // Use ArgumentNullException throw helper
#endif
public static class Program
{
public static int Main(string[] args)
Expand Down
2 changes: 2 additions & 0 deletions src/FrameworkTests/AspNetCore/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ private static string GetOutput()
{
using var input = new FileStream(Path.Combine(_hostingEnvironment!.WebRootPath, "SocialPreview.pdf"), FileMode.Open, FileAccess.Read);

#pragma warning disable CA1416 // Validate platform compatibility
using var bitmap = PDFtoImage.Conversion.ToImage(input);
#pragma warning restore CA1416 // Validate platform compatibility

return $"SocialPreview.pdf size: {bitmap.Width}x{bitmap.Height}";
}
Expand Down
2 changes: 2 additions & 0 deletions src/FrameworkTests/MauiApp/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ private async void OnCounterClicked(object sender, EventArgs e)
using var ms = new MemoryStream();
input.CopyTo(ms);

#pragma warning disable CA1416 // Validate platform compatibility
using var bitmap = PDFtoImage.Conversion.ToImage(ms);
#pragma warning restore CA1416 // Validate platform compatibility

OutputLabel.Text = $"SocialPreview.pdf size: {bitmap.Width}x{bitmap.Height}";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@
namespace PDFtoImage.FrameworkTests.MauiApp
{
[Application]
public class MainApplication : MauiApplication
public class MainApplication(IntPtr handle, JniHandleOwnership ownership) : MauiApplication(handle, ownership)
{
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
: base(handle, ownership)
{
}

protected override Microsoft.Maui.Hosting.MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
}
6 changes: 3 additions & 3 deletions src/FrameworkTests/MonoAndroid/MonoAndroid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@
<Folder Include="Resources\drawable\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.AndroidX.AppCompat" Version="1.6.1.5" />
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.10.0.1" />
<PackageReference Include="Xamarin.Essentials" Version="1.8.0" />
<PackageReference Include="Xamarin.AndroidX.AppCompat" Version="1.6.1.6" />
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.10.0.2" />
<PackageReference Include="Xamarin.Essentials" Version="1.8.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\PDFtoImage\PDFtoImage.csproj">
Expand Down
Loading

0 comments on commit e144280

Please sign in to comment.