webp_js/README.md: add some more code formatting (``)

Bug: webp:427525168
Change-Id: I979d0e7406ecc482a5ebb7d94cc50117f8384acc
This commit is contained in:
James Zern 2025-07-07 15:34:31 -07:00
parent f83c6b328f
commit 370aa5817e

View File

@ -13,7 +13,7 @@ Emscripten and CMake.
- install the Emscripten SDK following the procedure described at: - install the Emscripten SDK following the procedure described at:
https://emscripten.org/docs/getting_started/downloads.html#installation-instructions-using-the-emsdk-recommended https://emscripten.org/docs/getting_started/downloads.html#installation-instructions-using-the-emsdk-recommended
After installation, you should have some global variable positioned to the After installation, you should have some global variable positioned to the
location of the SDK. In particular, $EMSDK should point to the top-level location of the SDK. In particular, `$EMSDK` should point to the top-level
directory containing Emscripten tools. directory containing Emscripten tools.
- configure the project 'WEBP_JS' with CMake using: - configure the project 'WEBP_JS' with CMake using:
@ -23,12 +23,12 @@ Emscripten and CMake.
emcmake cmake -DWEBP_BUILD_WEBP_JS=ON ../ emcmake cmake -DWEBP_BUILD_WEBP_JS=ON ../
``` ```
- compile webp.js using 'emmake make'. - compile webp.js using `emmake make`.
- that's it! Upon completion, you should have the 'webp.js', 'webp.js.mem', - that's it! Upon completion, you should have the 'webp.js', 'webp.js.mem',
'webp_wasm.js' and 'webp_wasm.wasm' files generated. 'webp_wasm.js' and 'webp_wasm.wasm' files generated.
The callable JavaScript function is WebPToSDL(), which decodes a raw WebP The callable JavaScript function is `WebPToSDL()`, which decodes a raw WebP
bitstream into a canvas. See webp_js/index.html for a simple usage sample (see bitstream into a canvas. See webp_js/index.html for a simple usage sample (see
below for instructions). below for instructions).