diff --git a/codecs/resize/pkg/squoosh_resize.js b/codecs/resize/pkg/squoosh_resize.js index 82659497..bfb298ba 100644 --- a/codecs/resize/pkg/squoosh_resize.js +++ b/codecs/resize/pkg/squoosh_resize.js @@ -1,5 +1,3 @@ -import * as __wbg_star0 from 'env'; - let wasm; let cachegetUint8Memory0 = null; @@ -113,7 +111,6 @@ async function init(input) { input = import.meta.url.replace(/\.js$/, '_bg.wasm'); } const imports = {}; - imports['env'] = __wbg_star0; if ( typeof input === 'string' || diff --git a/codecs/resize/pkg/squoosh_resize_bg.wasm b/codecs/resize/pkg/squoosh_resize_bg.wasm index 35425a77..efa6811e 100644 Binary files a/codecs/resize/pkg/squoosh_resize_bg.wasm and b/codecs/resize/pkg/squoosh_resize_bg.wasm differ diff --git a/codecs/rust.Dockerfile b/codecs/rust.Dockerfile index 8887ff7b..41441879 100644 --- a/codecs/rust.Dockerfile +++ b/codecs/rust.Dockerfile @@ -2,7 +2,7 @@ FROM emscripten/emsdk:1.39.19 AS wasm-tools WORKDIR /opt/wasm-tools RUN wget -qO- https://github.com/rustwasm/wasm-pack/releases/download/v0.9.1/wasm-pack-v0.9.1-x86_64-unknown-linux-musl.tar.gz | tar -xzf - --strip 1 -FROM rust:1.44-stretch AS rust +FROM rust:1.46.0-slim-buster AS rust RUN rustup target add wasm32-unknown-unknown COPY --from=wasm-tools /emsdk/upstream/bin/wasm-opt /emsdk/upstream/bin/clang /usr/local/bin/ COPY --from=wasm-tools /emsdk/upstream/lib/ /usr/local/lib/ diff --git a/src/client/index.tsx b/src/client/index.tsx index dc19e94e..6243dd9b 100644 --- a/src/client/index.tsx +++ b/src/client/index.tsx @@ -31,8 +31,8 @@ async function demo() { const data = ctx.getImageData(0, 0, img.width, img.height); const result = await api.resize(data, { fitMethod: 'stretch', - height: 20, - width: 20, + height: 200, + width: 200, linearRGB: false, premultiply: true, method: 'lanczos3', @@ -49,6 +49,7 @@ async function demo() { canvas.height = result.height; const ctx = canvas.getContext('2d')!; ctx.putImageData(result, 0, 0); + document.body.append(canvas); } }