Skip to content

Commit

Permalink
renderer: use auto-detected ICC transfer if available
Browse files Browse the repository at this point in the history
Not sure this matters for anything. To be on the safe side, only force
it if there was an exact match.
  • Loading branch information
haasn committed Mar 11, 2024
1 parent 24c58bd commit 1469904
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/renderer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2936,11 +2936,15 @@ static void pass_fix_frames(struct pass_state *pass)
if (image && image->icc) {
image->color.primaries = image->icc->containing_primaries;
image->color.hdr = image->icc->csp.hdr;
if (image->icc->csp.transfer)
image->color.transfer = image->icc->csp.transfer;
}

if (target->icc) {
target->color.primaries = target->icc->containing_primaries;
target->color.hdr = target->icc->csp.hdr;
if (target->icc->csp.transfer)
target->color.transfer = target->icc->csp.transfer;
}

// Infer the target color space info based on the image's
Expand Down

0 comments on commit 1469904

Please sign in to comment.