Skip to content

A project to teach image compression algorithm, with running Rust functions in Node.js through the Second State WebAssembly engine.

Notifications You must be signed in to change notification settings

Atlasoin/image-playground

 
 

Repository files navigation

Getting started

This is a project to teach you how image compression algorithm wokrs.

But currently it only supports the feature to convert the uploaded jpg file to a grayscale file.

Build and run

Notes, in order to successfully build and run with the project, you should prepare the enviornment as instructed here.

# install dependencies
npm i
# build
npm run build
# start the server at http://localhost:8080
npm run start

Notes

According to the issue image-rs/image#879, we have to disable the "jpeg_rayon" feature in Cargo.toml.

To save converted image in server, we should use wasi + wasm https://www.secondstate.io/articles/wasi-access-system-resources/.

Resources

This project is inspired by this post and this post and this fantastic video. You can also learn more about image compression algorithm from them.

About

A project to teach image compression algorithm, with running Rust functions in Node.js through the Second State WebAssembly engine.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 57.4%
  • JavaScript 20.5%
  • Dockerfile 13.1%
  • HTML 8.5%
  • CSS 0.5%