Add ICC profile support - #1335
Draft
BobLd wants to merge 1 commit into
Draft
Conversation
BobLd
force-pushed
the
feature/icc-profile-support-2
branch
5 times, most recently
from
June 20, 2026 18:26
bc0043b to
6701900
Compare
…evel, do not ignore RI in SetNamedGraphicsState
BobLd
force-pushed
the
feature/icc-profile-support-2
branch
from
June 20, 2026 18:42
6701900 to
532443b
Compare
Collaborator
Author
|
the scope of this PR is too big, I will split it in smaller pieces |
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.
Adds optional ICC profile support to color handling, through a new
ParsingOptions.IccProfileServiceand 3 new public interfaces (IIccProfileService,IIccProfile,IIccTransform) that resolve raw profile bytes into reusable, intent-aware, sRGB-producing transforms.Rendering intent is now passed through the color pipeline via overloads on
ColorSpaceDetails, with the param-less versions delegating to the PDF default (RelativeColorimetric); the graphics-state intent is propagated fromColorSpaceContextand imageRenderingIntentflows throughColorSpaceDetailsByteConverterandPngFromPdfImageFactory.ICCBasedColorSpaceDetailsnow resolves a profile when a service is configured, and otherwise falls back silently to its alternate color space.ResourceStoregained default color space substitution (DefaultGray/DefaultRGB/DefaultCMYK) and exposes the configured IIccProfileService.A shared
DenormalizeComponentshelper centralizes mapping normalized [0,1] components to a space's native range (identity by default, overridden for Lab).No actual implementation of ICC processing is made available directly in PdfPig. This PR should be seen in combination with BobLd/PdfPig.Rendering.Skia#103 This uses Wacton.Unicolour (cc @waacton for visibility) as ICC profile processor.
UnicolourIccProfileis for the moment sitting with PdfPig.Rendering.Skia but will be split in its own NuGet package shortly.