{"id":24623149,"url":"https://github.com/ybouane/libraw-wasm","last_synced_at":"2025-07-16T06:35:36.773Z","repository":{"id":273654037,"uuid":"919824820","full_name":"ybouane/LibRaw-Wasm","owner":"ybouane","description":"LibRaw WASM bindings to be able to use it in the browser.","archived":false,"fork":false,"pushed_at":"2025-02-02T00:05:58.000Z","size":37405,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-19T02:08:41.792Z","etag":null,"topics":["browser","emscripten","javascript","libraw","photo","photography","raw","raw-image","wasm"],"latest_commit_sha":null,"homepage":"https://ybouane.com/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ybouane.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-21T04:47:37.000Z","updated_at":"2025-02-23T17:02:40.000Z","dependencies_parsed_at":"2025-01-22T07:38:24.551Z","dependency_job_id":null,"html_url":"https://github.com/ybouane/LibRaw-Wasm","commit_stats":null,"previous_names":["ybouane/libraw-wasm"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybouane%2FLibRaw-Wasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybouane%2FLibRaw-Wasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybouane%2FLibRaw-Wasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybouane%2FLibRaw-Wasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ybouane","download_url":"https://codeload.github.com/ybouane/LibRaw-Wasm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244339043,"owners_count":20437168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser","emscripten","javascript","libraw","photo","photography","raw","raw-image","wasm"],"created_at":"2025-01-25T03:33:46.782Z","updated_at":"2025-03-19T02:08:48.876Z","avatar_url":"https://github.com/ybouane.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LibRaw-Wasm\nA WebAssembly build of LibRaw, powered by Emscripten and leveraging Web Workers. This lets you decode and process RAW image files directly in the browser or in a Node.js environment supporting WebAssembly. With LibRaw-Wasm, you can extract metadata and obtain decoded image data from formats such as CR2, NEF, ARW, DNG, and more.\n\nThis package provides an asynchronous API for opening RAW images and processing them using the same robust codebase behind LibRaw.\n\nLibRaw-Wasm's processing is done in a Web Worker to avoid blocking the main UI thread.\n\n\n# Install\n```bash\nnpm install libraw-wasm\n```\n\n# Basic usage\n```javascript\nimport LibRaw from 'libraw-wasm';\n\nconst output = document.getElementById('output');\n// Instantiate LibRaw\nconst raw = new LibRaw();\n// Open (decode) the RAW file\nawait raw.open(new Uint8Array(fileBuffer), { /* settings */ });\n\n// Fetch metadata\nconst meta = await raw.metadata(/* fullOutput=false */);\nconsole.log('Metadata:', meta);\noutput.innerText = JSON.stringify(meta, null, 4);\n\n// Fetch the decoded image data (RGB pixels)\nconst imageData = await raw.imageData();\nconsole.log('Image data:', imageData);\nconsole.log('Image data length:', imageData.length);\n\n```\n\n# Settings\n```javascript\n{\n\tbright: 1.0,\t\t\t// -b \u003cfloat\u003e : brightness\n\tthreshold: 0.0,\t\t\t// -n \u003cfloat\u003e : wavelet denoise threshold\n\tautoBrightThr: 0.01,\t// portion of clipped pixels for auto-brightening\n\tadjustMaximumThr: 0.75,\t// auto-adjust max if channel overflow above threshold\n\texpShift: 1.0,\t\t\t// exposure shift in linear scale (requires expCorrec=1)\n\texpPreser: 0.0,\t\t\t// preserve highlights when expShift\u003e1 (0..1)\n\n\thalfSize: false,\t\t// -h  : output at 1/2 size\n\tfourColorRgb: false,\t// -f  : separate interpolation for two green channels\n\thighlight: 0,\t\t\t// -H  : highlight mode (0..9)\n\tuseAutoWb: false,\t\t// -a  : auto white balance\n\tuseCameraWb: false,\t\t// -w  : camera's recorded WB\n\tuseCameraMatrix: 1,\t\t// +M/-M : color profile usage (0=off,1=on if WB,3=always)\n\toutputColor: 1,\t\t\t// -o  : output colorspace (0..8) (0=raw,1=sRGB,2=Adobe, etc.)\n\toutputBps: 8,\t\t\t// -4  : 8 or 16 bits per sample\n\toutputTiff: false,\t\t// -T  : output TIFF if true, else PPM\n\toutputFlags: 0,\t\t\t// bitfield for custom output flags\n\tuserFlip: -1,\t\t\t// -t  : flip/rotate (0..7, default=-1 means use RAW value)\n\tuserQual: 3,\t\t\t// -q  : interpolation quality (0..12)\n\tuserBlack: -1,\t\t\t// -k  : user black level\n\tuserCblack: [-1, -1, -1, -1], // per-channel black offsets\n\tuserSat: 0,\t\t\t\t// -S  : saturation level\n\tmedPasses: 0,\t\t\t// -m  : median filter passes\n\tnoAutoBright: false,\t// -W  : don't apply auto brightness\n\tuseFujiRotate: -1,\t\t// -j  : -1=use, 0=off, 1=on, for Fuji sensor rotation\n\tgreenMatching: false,\t// fix green channel imbalance (not a dcraw key)\n\tdcbIterations: -1,\t\t// additional DCB passes (-1=off)\n\tdcbEnhanceFl: false,\t// enhance color fidelity in DCB\n\tfbddNoiserd: 0,\t\t\t// 0=off,1=light,2=full FBDD denoise\n\texpCorrec: false,\t\t// enable exposure correction (then expShift, expPreser apply)\n\tnoAutoScale: false,\t\t// skip scale_colors (affects WB)\n\tnoInterpolation: false,\t// skip demosaic entirely (outputs raw mosaic)\n\n\tgreybox: null,\t\t\t// -A x y w h : rectangle (x,y,width,height) for WB calc\n\tcropbox: null,\t\t\t// Cropping rectangle (left, top, w, h) applied before rotation\n\taber: null,\t\t\t\t// -C (red multiplier = aber[0], blue multiplier = aber[2])\n\tgamm: null,\t\t\t\t// -g power toe_slope (1/power -\u003e gamm[0], gamm[1] -\u003e slope)\n\tuserMul: null,\t\t\t// -r mul0 mul1 mul2 mul3 : user WB multipliers (r, g, b, g2)\n\n\toutputProfile: null,\t// -o \u003cfilename\u003e : output ICC profile (if compiled w/ LCMS)\n\tcameraProfile: null,\t// -p \u003cfilename\u003e or 'embed' : camera ICC profile\n\tbadPixels: null,\t\t// -P \u003cfile\u003e : file with bad pixels map\n\tdarkFrame: null,\t\t// -K \u003cfile\u003e : file with dark frame (16-bit PGM)\n}\n```\n\n\n# Additional Notes\n- **Performance:** Decoding large RAW files in the browser can be CPU-intensive.\n- **Memory:** WebAssembly modules can allocate a significant amount of memory. Check your environment’s limits if you work with very large files.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fybouane%2Flibraw-wasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fybouane%2Flibraw-wasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fybouane%2Flibraw-wasm/lists"}