Documentation ¶
Overview ¶
Package golibjpegturbo is the fastest way to decode and encode JPEG images in Go.
We achieve this via cgo bindings to http://libjpeg-turbo.virtualgl.org library.
The exact speed depends on the image and CPU. On Mac Book Pro, compared to image/jpeg standard library, golibjpegturbo is:
* 6x faster when decoding
* 1.7x faster when encoding at quality level of 90%
Before you import library, you need to install libjpeg-turbo.
On Ubuntu: sudo apt-get install libjpeg-turbo8-dev.
On Mac OS X: brew install libjpeg-turbo
Index ¶
Constants ¶
const DefaultQuality = 75
DefaultQuality is the default quality encoding parameter.
Variables ¶
This section is empty.
Functions ¶
func DecodeData ¶
DecodeData reads JPEG image from d and returns it as an image.Image.
Types ¶
type JpegInfo ¶
JpegInfo contains information about JPEG image.
func GetJpegInfo ¶
GetJpegInfo returns information about a JPEG image.