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
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public async Task Render_NominalCard()
_output.WriteLine(JsonSerializer.Serialize(config, new JsonSerializerOptions { WriteIndented = true }));
_output.WriteLine("--------------------------------------");

string imageFile = null;
string? imageFile = null;
try
{
// 2. Exécution "in-process"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Spectre.Console;
#nullable enable annotations
using Spectre.Console;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public static void ConvertToCmyk(this MagickImage image)
image.Alpha(AlphaOption.Remove);
image.Settings.BackgroundColor = MagickColors.White;
//image.TransformColorSpace(ColorProfile.SRGB, ColorProfile.USWebCoatedSWOP);
image.TransformColorSpace( ColorProfile.USWebCoatedSWOP, ColorTransformMode.Quantum);
image.TransformColorSpace( ColorProfiles.USWebCoatedSWOP, ColorTransformMode.Quantum);

image.ColorSpace = ColorSpace.CMYK;
image.Settings.ColorSpace = ColorSpace.CMYK;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
using System.Threading.Tasks;
using System.Diagnostics;
using System.Threading;
using System.Xml.Xsl;
using Color = System.Drawing.Color;
using Argumentum.AssetConverter.Entities;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ public CardGridComponent(IEnumerable<byte[]> cardImageData, int columns, float p

public void Compose(IContainer container)
{
// QuestPDF deprecated Grid in 2022.11 in favour of Table, but this project deliberately
// pins QuestPDF at 2022.12.12 (thread-safety — see CLAUDE.md stable-versions table) and is
// NOT upgrading it for the v0.9.0 release. Grid stays: a faithful Table migration is not
// possible here without a layout regression. Grid(N) means "N fixed-width columns regardless
// of item count" and stores N as a cheap layout parameter, so it tolerates the large/degenerate
// column counts that ComputePageGeometry can yield for edge configs (e.g. tiny card sizes).
// Materialising N explicit Table.RelativeColumn() definitions instead allocates N column
// objects and OOMs on those same inputs (regression caught by PdfAssemblerTests). The obsolete
// warning is therefore suppressed with justification rather than "fixed" by a risky rewrite.
#pragma warning disable CS0618 // QuestPDF Grid deprecated; pinned version + no faithful Table equivalent
container.Grid(grid =>
{
grid.Columns(_columns);
Expand All @@ -36,6 +46,7 @@ public void Compose(IContainer container)
}
}
});
#pragma warning restore CS0618
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ public PdfManager()
{
}

private const float InchToCentimetre = 2.54f;
private const float InchToPoints = 72;
private float MmToPointsFactor = 0.1f / InchToCentimetre * InchToPoints;

internal void GenerateFacesOnly(string baseName, List<CardImages> cardImages, bool overwriteExistingDocs)
{
var targetFiles = new List<(string fileName, Func<MagickImageCollection> documentImages)>();
Expand Down
Loading