Repository navigation
ci: Remove pnpm version from publish workflow - #77
Merged
Merged
Conversation
kylebarron
enabled auto-merge (squash)
December 18, 2025 21:35
kylebarron
added a commit
that referenced
this pull request
Oct 13, 2026
) Closes #686. Big endian (`MM`) TIFFs decoded to byte-swapped pixel values: `toTypedArray` views the decoded bytes in the platform's byte order, and `DecoderMetadata` didn't carry the file's. ### Changes - `DecoderMetadata` gains an optional `littleEndian` (default `true`, so existing callers of `decode()` are unaffected). `fetch.ts` sets it from `image.tiff.isLittleEndian` for both data and mask tiles. - `decode()` byte-swaps samples wider than 8 bits from big endian files, **before** `applyPredictor`, since horizontal differencing (predictor 2) has to accumulate native-order integers. - Predictor 3 is excluded: its byte planes are most significant byte first in every file (TIFF Technical Note 3), and `decodeRowFloatingPoint` already reassembles them in platform order. - The swap writes to a new buffer, because the uncompressed decoder returns the caller's bytes, which may be shared with the block cache. - Codecs that return typed pixels (LERC, JPEG, WebP) don't go through this path and are unchanged. ### Tests Three unit tests in `decode.test.ts` build big endian tiles from known values: - float32, no predictor (also asserts the input buffer is untouched) - uint16, predictor 2 - float32, predictor 3, decoded as both `II` and `MM`, which must agree The first two fail on main; the third fails if the swap is applied to predictor 3. `pnpm typecheck` and `biome check` are clean. The second commit bumps `fixtures/geotiff-test-data` to pick up its big endian fixtures (developmentseed/geotiff-test-data#73, #77) and adds both to `integration-rasterio.test.ts`: - `uint16_1band_lzw_block128_predictor2_big_endian`: fails `tile pixel data matches` on main, passes here. - `float32_1band_deflate_block64_predictor3_big_endian`: passes either way, and guards against swapping predictor 3 byte planes. With `pixi run generate-npy` as in CI, the integration suite passes 19/19 here and fails only the uint16 big endian case against main's `decode.ts` / `fetch.ts`. --------- Co-authored-by: Kyle Barron <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
This failed because I also have the pnpm version saved in package.json:
https://github.com/developmentseed/deck.gl-raster/actions/runs/20351997654/job/58478667252