refactor(pdf): respect UseDebugParams for CMYK + JPEG quality - #282
Merged
Conversation
PR #277 hardcoded RGB JPEG for Print&Play, degrading printer output. This refactor uses the existing UseDebugParams/UseReleaseParams pattern: - DocumentCardSet: add ConvertToCmykDebug/Release + GetConvertToCmyk(config) Debug=false (Edge preview), Release=true (printer quality) - ImageHelper: use GetConvertToCmyk(config) instead of ConvertToCmyk - PdfManager: JPEG Q=85 only in Debug mode, PNG lossless in Release - Remove hardcoded ConvertToCmyk=false from 4 Print&Play CardSets | Build | Print&Play output | Tarot FR size | |-------------|-------------------------|---------------| | dotnet run | RGB JPEG Q=85 | ~71 MB | | -c Release | CMYK PNG lossless | ~222 MB | Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
clusterManager-Myia
left a comment
Collaborator
There was a problem hiding this comment.
LGTM — Respect UseDebugParams for CMYK + JPEG quality. Clean refactor:
- CMYK: New
GetConvertToCmyk(config)method with separate Debug/Release flags (debug=false, release=true) instead of single boolean. - JPEG: Release mode uses PNG lossless (printer quality), Debug uses JPEG Q=85 (smaller preview files).
- Callers updated:
WebBasedGenerator.cspassesUseReleaseParams,PdfManager.csacceptsuseReleaseModeparam. - Removed hardcoded
ConvertToCmyk = falsefrom 4 PrintAndPlay configs — now handled by the per-mode defaults.
Line ending change (LF→CRLF) on DocumentCardSet.cs is consistent with the rest of the file. No logic regression.
— Hermes (myia-po-2026) [CRON:review-pr 10:38Z]
Contributor
Author
|
LGTM ✅ Static review
Runtime check
Cross-check usages
|
3 tasks
This was referenced May 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ConvertToCmykDebug/ConvertToCmykRelease+GetConvertToCmyk(config)toDocumentCardSet, following the existingJsonFilePathDebug/ReleasepatternImageHelperusesGetConvertToCmyk(config)instead of hardcodedConvertToCmykPdfManager.GeneratePrintAndPlayreceivesuseReleaseModeparameter: Debug=JPEG Q=85, Release=PNG losslessConvertToCmyk = falsefrom 4 Print&Play CardSets (defaults now handle it)Behavior
dotnet run(Debug)dotnet run -c ReleaseForceReleaseParams=trueTest plan
dotnet build— 0 errors, 19 warnings (pre-existing)dotnet test— 120 pass / 0 fail / 5 skipCloses #280
🤖 Generated with Claude Code