COGLayer draws 4-band CMYK COGs as RGBA, skipping CMYKToRGB
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- computer-graphics, frontend
Research direction
Start in packages/deck.gl-geotiff/src/geotiff/render-pipeline.ts, especially photometricInterpretationToRGB and its CMYKToRGB, cieLabToRGB, and Ycbcr cases. First check what the JPEG decoding path returns for CMYK, then find or create CMYK and CIELab fixtures; the issue names GDAL creation options. Done means selecting conversions by photometric interpretation and testing that CMYK and CIELab render correctly without double converting JPEG data.
Written by the indexing model from the issue text.
Description
[!NOTE]
This issue was written by Claude (Claude Code), not by @kylebarron.
COGLayer's default pipeline draws a 4-band CMYK COG as if its bands were red, green, blue and alpha, so its colors are wrong.
Cause
photometricInterpretationToRGB returns no color conversion for any 3- or 4-band image before it looks at the photometric interpretation (render-pipeline.ts#L307-L310):
if (count === 3 || count === 4) {
// Always interpret 3-band or 4-band images as RGB/RGBA
return null;
}
So the CMYKToRGB case for Photometric.Separated (L356-L360) never runs for a 4-band image. The same check skips the cieLabToRGB case (L366-L369) for a 3-band CIELab image.
This predates 0.10.
Fix
Choose the conversion by photometric interpretation first, and keep the band-count check only for the interpretations that need no conversion.
Before changing it:
- JPEG compression.
@developmentseed/geotiffdecodes JPEG tiles through the browser's image decoder, which already converts YCbCr to RGB (theYcbcrcase relies on that). Check what that path returns for a JPEG-compressed CMYK file, which a browser may also convert, soCMYKToRGBwould run twice. - Fixtures. geotiff-test-data has no CMYK or CIELab file, so a test needs one. GDAL writes CMYK with
-co PHOTOMETRIC=CMYKand CIELab with-co PHOTOMETRIC=CIELAB.
🤖 Written by Claude Code
- Dominant language
- TypeScript
- Stars
- 240
- Forks
- 34
- Avg merge
- 17h 24m
- Merged PRs (30d)
- 62
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from developmentseed/deck.gl-raster
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
developmentseed/deck.gl-raster#589 ·
Maintainers usually reply within 1 day
-
zarr
Difficulty 3/5 1-2 days Newbie friendliness 45/100
developmentseed/deck.gl-raster#889 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
developmentseed/deck.gl-raster#879 ·
Maintainers usually reply within 1 day
-
Zooming in shows a checkerboard of placeholder tiles when overview tiles are smaller than full-resolution tilesPossibly taken @kylebarron claimed this 16 days ago. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
developmentseed/deck.gl-raster#873 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
developmentseed/deck.gl-raster#866 ·
Maintainers usually reply within 1 day
All issues in developmentseed/deck.gl-raster
Similar issues
-
Add Alice&BotOpen
Difficulty 1/5 Under an hour Newbie friendliness 72/100
slavakurilyak/awesome-ai-agents#1048 ·
-
bot:ai-assisted component:faucet github_actions security status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
midnightntwrk/midnight-faucet-api#215 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
NanmiCoder/cc-haha#2034 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
MoonshotAI/kimi-code#5539 ·
Maintainers usually reply within 1 day
-
mobile prio:low
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
digitalfabrik/entitlementcard#3324 ·
Maintainers usually reply within 2 days