webassembly-jpeg - Read and write jpeg with WebAssembly

  •        318

When index.html is launched in your browser, a Jpeg image is fetched() and processed as raw data (see loadSrcImage). The data are given to the C/WASM code through setSrcImage : it will decode the raw data as Jpeg and store the bitmap in memory for further Jpeg encoding/decoding. After this init step, when the user moves the slider, the update JS function will call the compress C/WASM function. This is the app core : the image is encoded with the given quality value, then decoded and send back to the Javascript. Finally, the image is displayed in a canvas. Have a look to the code (especially index.html), almost every line is commented.

https://github.com/AntoineViau/webassembly-jpeg

Dependencies:

node-static : ^0.7.10

Tags
Implementation
License
Platform

   




Related Projects

Mozjpeg - Improved JPEG encoder

  •    C

MozJPEG reduces file sizes of JPEG images while retaining quality and compatibility with the vast majority of the world's deployed decoders.MozJPEG is based on libjpeg-turbo. It's compatible with libjpeg API and ABI, and can be used as a drop-in replacement for libjpeg. MozJPEG makes tradeoffs that are intended to benefit Web use cases and focuses solely on improving encoding, so it's best used as part of a Web encoding workflow.

adept-jpg-compressor - A Bash script to automate adaptive JPEG compression using common CLI tools

  •    Shell

When compressing JPEG images, the same compression level is used on the entire image. However, most JPEG images contain homogeneous and heterogeneous areas, which are varyingly well-suited for compression. Compressing heterogeneous areas in JPEGs to reduce filesize causes compression artefacts due to the lossy nature of JPEG compression. This script adaptively alters the compression level for areas within JPEGs (per-block) to achieve optimized file size while maintaining a decent visual quality. This script achieves a significantly reduced file size compared to standard tools such as cjpeg while maintaining good visual quality, as can be measured via SSIM. This is good news for the Web Performance and thus Web Developer community to achieve a great user experience on websites.

Brunsli - Lossless JPEG repacking library

  •    C++

Brunsli is a lossless JPEG repacking library. Brunsli allows for a 22% decrease in file size while allowing the original JPEG to be recovered byte-by-byte. Brunsli has been specified as the lossless JPEG transport layer in the Committee Draft of JPEG XL Image Coding System and is ready to power faster and more economical transfer and storage of photographs.

JPEG in Ch

  •    

Ch JPEG 1.0 is the Ch binding to the JPEG C library version 6b. Ch JPEG enables all functions in the JPEG library for use in Ch. With Ch JPEG, these functions can run in Ch interpretively without compilation.


CharLS, a JPEG-LS library

  •    C++

An optimized implementation of the JPEG-LS standard for lossless and near-lossless image compression. JPEG-LS is a low-complexity standard that matches JPEG 2000 compression ratios. In terms of speed, CharLS outperforms open source and commercial JPEG LS implementations.

jsteg - JPEG steganography

  •    Go

jsteg is a package for hiding data inside jpeg files, a technique known as steganography. This is accomplished by copying each bit of the data into the least-significant bits of the image. The amount of data that can be hidden depends on the filesize of the jpeg; it takes about 10-14 bytes of jpeg to store each byte of the hidden data. Note that the data is not demarcated in any way; the caller is responsible for determining which bytes of hidden it cares about. The easiest way to do this is to prepend the data with its length.

libjpeg-turbo - Main libjpeg-turbo repository

  •    C

libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, ARM, and PowerPC systems. On such systems, libjpeg-turbo is generally 2-6x as fast as libjpeg, all else being equal. On other types of systems, libjpeg-turbo can still outperform libjpeg by a significant amount, by virtue of its highly-optimized Huffman coding routines. In many cases, the performance of libjpeg-turbo rivals that of proprietary high-speed JPEG codecs.libjpeg-turbo implements both the traditional libjpeg API as well as the less powerful but more straightforward TurboJPEG API. libjpeg-turbo also features colorspace extensions that allow it to compress from/decompress to 32-bit and big-endian pixel buffers (RGBX, XBGR, etc.), as well as a full-featured Java interface.

JPNG - JPNG is a bespoke image file format that combines the compression benefits of JPEG with the alpha channel support of a PNG file

  •    Objective-C

In iOS and Mac OS apps there is typically a choice of two image formats: PNG format allows transparency but produces large image files and is unsuited to compressing images like photographs; JPEG is great for creating small files and provides a range of compression qualities to suit the subject matter, but doesn't allow for transparency. JPNG is a new image format that combines the best of both of the other formats. JPNG is not really a format in its own right, it's a simple file wrapper that combines a JPEG and PNG image within the same file. JPEG is used to efficiently compress the RGB portion of the image and PNG is used to store the alpha channel.

IJG - Independent JPEG Group

  •    C

IJG is an informal group that writes and distributes a widely used free library for JPEG image compression. JPEG is designed for compressing either full-color or gray-scale images of natural, real-world scenes.

go-thumber - dynamic JPEG thumbnailing proxy written in Golang

  •    Go

go-thumber is a dynamic JPEG thumbnailing proxy designed for speed. It implements JPEG -> JPEG thumbnailing only. And the versioning is possible on build-time.

PhotoFrame

  •    PHP

PhotoFrame is a PHP5 script that automatically creates a clean Web interface (using frames) from a directory full of JPEG, PNG and GIF images. It creates thumbnails automatically and can use JPEG comments if it finds them. Features web administration.

Camera to Jpeg Files

  •    

This is a WPF app that is based on DirectShow. It takes the input from a web camera and turns it into a sequence of JPEG images. I need this for another project but I thought I might share this part anyway in case anyone needs similar solution.

GraphicsMagick

  •    C++

GraphicsMagick is the swiss army knife of image processing. It provides a robust and efficient collection of tools and libraries which support reading, writing, and manipulating an image in over 88 major formats including important formats like DPX, GIF, JPEG, JPEG-2000, PNG, PDF, PNM, and TIFF.

vips - Go Bindings for Vips (a super fast image processor)

  •    Go

This package is powered by the blazingly fast libvips image processing library, originally created in 1989 at Birkbeck College and currently maintained by JohnCupitt. The typical use case for this high speed package is to convert large images of many formats to smaller, web-friendly JPEG, PNG images of varying dimensions.

Sharp - High performance Node.js image processing

  •    Javascript

The typical use case for this high speed Node.js module is to convert large images in common formats to smaller, web-friendly JPEG, PNG and WebP images of varying dimensions.Resizing an image is typically 4x-5x faster than using the quickest ImageMagick and GraphicsMagick settings.

latex2slides

  •    Python

Latex2slides is a simple graphical program that produces a set of HTML/JPEG slides from a TeX or LaTeX source. Each Postscript page is converted to a JPEG image using ImageMagick's convert. The program then makes one HTML page for each JPEG (or slide), a

Common Lisp JPEG Library

  •    

Common Lisp JPEG Library implements baseline JPEG image compression/decompression routines in ANSI Common Lisp.

Animated JPEG XR Concept

  •    

A concept for a version of the JPEG XR file format with animation functionality.

JPEG XR plugin for Quick Look

  •    

JPEG XR plugin for Quick Look





We have large collection of open source products. Follow the tags from Tag Cloud >>


Open source products are scattered around the web. Please provide information about the open source projects you own / you use. Add Projects.