Skip to content

Fix TIFF decoding of legacy 8-bit color maps - #3189

Merged
JimBobSquarePants merged 1 commit into
release/4.1.xfrom
js/issue-3182
Sep 14, 2026
Merged

JimBobSquarePants merged 1 commit into
release/4.1.xfrom
js/issue-3182

Conversation

@JimBobSquarePants

Copy link
Copy Markdown
Member

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

Fixes #3182

Fixes near-black TIFF output when ColorMap entries use the legacy 0–255 range. Uses SIMD-backed range detection to select the correct palette scaling and adds synthetic regression coverage for both 8-bit and 16-bit color maps.

@JimBobSquarePants
JimBobSquarePants merged commit dee4140 into release/4.1.x Sep 14, 2026
11 checks passed
@JimBobSquarePants
JimBobSquarePants deleted the js/issue-3182 branch September 14, 2026 03:37
This was referenced Sep 14, 2026
IhateTrains pushed a commit to ParadoxGameConverters/ImperatorToCK3 that referenced this pull request Sep 16, 2026
Updated [SixLabors.ImageSharp](https://github.com/SixLabors/ImageSharp)
from 4.1.1 to 4.1.2.

<details>
<summary>Release notes</summary>

_Sourced from [SixLabors.ImageSharp's
releases](https://github.com/SixLabors/ImageSharp/releases)._

## 4.1.2

## What's Changed
* Harden codec and metadata input validation by @​JimBobSquarePants in
SixLabors/ImageSharp#3187
* Fix TIFF decoding of legacy 8-bit color maps by @​JimBobSquarePants in
SixLabors/ImageSharp#3189


**Full Changelog**:
SixLabors/ImageSharp@v4.1.1...v4.1.2

Commits viewable in [compare
view](SixLabors/ImageSharp@v4.1.1...v4.1.2).
</details>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=SixLabors.ImageSharp&package-manager=nuget&previous-version=4.1.1&new-version=4.1.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TIFF decode: 8-bit Palette + LZW + Predictor=2 produces near-uniform near-black pixel data

1 participant