[piexwasm] Add Piex Wasm reader exposing an image() read API to JS
Wrap raw image data in a PiexStreamReader, and process it via Piex, to extract the preview and thumbnail image properties. Caller (JS on the same web page) owns the data. All this code needs to do is provide the offset and length of the image preview or thumbnail, as well its EXIF color space and orientation information, and callback these results in a JS object. The result includes the camera maker and model, and preview and thumbnail image format/width/height properties, for testing purposes [1]. Add fake DEPS to node_modules/piex to silence bogus presubmit error on uploading this patch. Update Wasm Makefile for new piex.cpp code. Build products we care about are the a.out.{js,wasm}. Build sizes look good running: % ls -sh a.out* 36K a.out.js 60K a.out.wasm [1] Note the upstream Piex code is fuzzed, and has a large test suite. Our test approach can be much simpler therefore, as we'll soon see. Tbr: slangley Bug: 935285 Change-Id: I406dc08c908027782390e793bf6c7765bf0afa39 Reviewed-on: https://chromium-review.googlesource.com/c/1488474 Commit-Queue: Noel Gordon <noel@chromium.org> Reviewed-by:Jochen Eisinger <jochen@chromium.org> Cr-Commit-Position: refs/heads/master@{#635788}
Showing
Please register or sign in to comment