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

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
</ItemGroup>
<ItemGroup Label="Telerik NuGet Packages References">
<PackageReference Include="Telerik.Documents.Core" Version="*" />
<PackageReference Include="Telerik.Documents.Fixed" Version="*" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public override bool TryConvertToJpegImageData(byte[] imageData, ImageQuality im
using (MagickImage magickImage = new MagickImage(imageData))
{
magickImage.Alpha(AlphaOption.Remove);
magickImage.Quality = (int)imageQuality;
magickImage.Quality = (uint)imageQuality;

jpegImageData = magickImage.ToByteArray(MagickFormat.Jpeg);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
Expand All @@ -19,8 +19,7 @@
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Magick.NET-Q16-AnyCPU" Version="13.6.0" />
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
<PackageReference Include="Magick.NET-Q16-AnyCPU" Version="14.4.0" />
</ItemGroup>
<ItemGroup>
</ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions PdfProcessing/CustomJpegImageConverter/DocumentGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ private void AddPageWithImage()
editor.GraphicProperties.IsStroked = false;
editor.GraphicProperties.FillColor = new RgbColor(200, 200, 200);
editor.DrawRectangle(new Rect(0, 0, PageSize.Width, PageSize.Height));
Margins margins = new Margins();
editor.Position.Translate(margins.Left, margins.Top);
Thickness thickness = new Thickness(100);
editor.Position.Translate(thickness.Left, thickness.Top);

Block block = new Block();
block.HorizontalAlignment = HorizontalAlignment.Center;
Expand All @@ -52,7 +52,7 @@ private void AddPageWithImage()
Size blockSize = block.Measure(RemainingPageSize);
editor.DrawBlock(block, RemainingPageSize);

editor.Position.Translate(margins.Left, blockSize.Height + margins.Top + 20);
editor.Position.Translate(thickness.Left, blockSize.Height + thickness.Top + 20);

Block imageBlock = new Block();
imageBlock.HorizontalAlignment = HorizontalAlignment.Center;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ApplicationIcon />
<OutputType>Exe</OutputType>
Expand Down Expand Up @@ -39,7 +39,7 @@
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
<PackageReference Include="System.Drawing.Common" Version="9.0.0" />
</ItemGroup>
<ItemGroup>
</ItemGroup>
Expand Down