Add rawImageData() + local rebuild at LibRaw 0.22.1#16
Merged
Conversation
- Add rawImageData() returning the raw, undebayered 16-bit sensor mosaic (wrapper binding + index.js method + RawSensorData type + README/example). Reimplemented from @hrueger's PR #4 on top of the current codebase. - Rebuild libraw.js/libraw.wasm + static libs locally from source at the pinned LibRaw 0.22.1 / LCMS 2.19.1 (Emscripten 4.0.1), verifying the binaries decode example-sony.ARW correctly (Sony ILME-FX30). - Bump version to 1.3.0 and credit PR contributors. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Closed
dcraw_make_mem_thumb() only fills width/height for bitmap thumbnails and leaves them at 0 for JPEG passthrough. Fall back to the dimensions LibRaw parsed into imgdata.thumbnail (twidth/theight) during identify. Verified on example-sony.ARW: thumbnail now reports 6192x4128 (was 0x0). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner
Author
|
Also fixed |
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.
Summary
Follow-up to merging #14 (types) and #15 (LibRaw 0.22.1) — adds the one genuinely-missing feature from the stale #4 and rebuilds the binaries from source so they're verified locally rather than trusted as prebuilt blobs.
rawImageData()— returns the raw, undebayered 16-bit sensor mosaic without demosaicing. Reimplemented from @hrueger's Minor improvements #4 on top of the current codebase (wrapper binding +index.jsmethod +RawSensorDatatype + README/example docs).libraw.js/libraw.wasm+ static libs from source at the pinned LibRaw 0.22.1 / LCMS 2.19.1 (Emscripten 4.0.1), replacing rebuild with LibRaw 0.22.1 — add Nikon Z f, Z8, Z6III and more camera support #15's prebuilt binaries with locally-built ones.1.3.0and contributor credits.Verification
Drove the rebuilt module in headless Chrome (COOP/COEP) against
example-sony.ARW:imageData()→ 3120×2084 (half-size), 3ch/8-bitUint8Array✅rawImageData()→Uint16Arraylength 26,141,696 = 6272×4168 full sensor mosaic ✅thumbnailData()→ embedded JPEG returned ✅Note
LibRaw 0.22.1 is the latest stable tag (checked upstream tags) — no newer version to adopt.
🤖 Generated with Claude Code