mozjpeg

package
v0.0.0-...-d85901e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package mozjpeg implements image encoding/decoding through MozJPEG compiled to WASM.

Package mozjpeg implements image encoding/decoding through MozJPEG compiled to WASM.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(r io.Reader) ([]byte, int, int, error)

Decode reads JPEG data and returns a RGB-encoded byte slice.

func Encode

func Encode(r io.Reader, width int, height int, quality int) ([]byte, error)

Encode reads RGB data and returns a JPEG-encoded byte slice. The width and height of the original image must be provided, together with the JPEG compression quality (0-100).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL