Fix ambiguous -P/-p option conflict: rename par-archive flag to -x
McMaster.Extensions.CommandLineUtils treats short option names case-insensitively, so -P (ParArchive) collided with -p (IsParallel), crashing on startup with InvalidOperationException. Renamed -P|--par-archive to -x|--par-archive. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+9
-2
@@ -64,7 +64,14 @@ namespace ComicCompressor
|
||||
// In core changed color of percent save to white
|
||||
//string progVersion = "Version 3.0.1 - (23/01/2025)";
|
||||
|
||||
// In core changed color of percent save to white
|
||||
// Updated NuGet packages (SharpCompress 0.49, Magick.NET 14.14, System.Drawing.Common 10.0,
|
||||
// itext 9.6, Imazen.WebP 11.0, McMaster 5.1). SharpCompress 0.49 API migration.
|
||||
// Pre-sized MemoryStream allocations with entry.Size (reduced GC pressure).
|
||||
// Fixed missing OnExecuteAsync (CLI was throwing InvalidOperationException on launch).
|
||||
// Added -w|--new-webp flag (Imageflow encoder; benchmarked slower than Imazen.WebP).
|
||||
// Added -x|--par-archive: parallel image compression within archive (~4-5x speedup).
|
||||
// Batched 3-phase: sequential read → Parallel.For (ProcessorCount/2) → sequential write.
|
||||
// GUI: added Par.Archive checkbox (default ON for COMIX/COMIX+PDF modes).
|
||||
string progVersion = "Version 3.1.0 - (27/06/2027)";
|
||||
public static int Main(string[] args) => CommandLineApplication.Execute<Program>(args);
|
||||
|
||||
@@ -108,7 +115,7 @@ namespace ComicCompressor
|
||||
[Option("-w|--new-webp", Description = "Use Imageflow encoder (faster JPEG→WebP transcoding, no full pixel decode)")]
|
||||
public bool NewWebp { get; } = false;
|
||||
|
||||
[Option("-P|--par-archive", Description = "Parallel image compression within each archive (~4-5x faster, uses half the CPUs)")]
|
||||
[Option("-x|--par-archive", Description = "Parallel image compression within each archive (~4-5x faster, uses half the CPUs)")]
|
||||
public bool ParArchive { get; } = false;
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user