Versions in this module Expand all Collapse all v1 v1.0.1 Sep 20, 2020 Changes in this version type Image + func FromImage(src image.Image, allowDeepClone bool) *Image v1.0.0 Sep 20, 2020 Changes in this version + func Compress(img *Image, params CompressParams) ([]byte, error) + type CompressParams struct + Flags Flags + PixelFormat PixelFormat + Quality int + Sampling Sampling + func MakeCompressParams(pixelFormat PixelFormat, sampling Sampling, quality int, flags Flags) CompressParams + type Flags C.int + const FlagAccurateDCT + const FlagBottomUp + const FlagFastDCT + const FlagFastUpsample + const FlagNoRealloc + const FlagProgressive + const FlagStopOnWarning + type Image struct + Height int + Pixels []byte + Stride int + Width int + func Decompress(encoded []byte) (*Image, error) + type PixelFormat C.int + const PixelFormatABGR + const PixelFormatARGB + const PixelFormatBGR + const PixelFormatBGRA + const PixelFormatBGRX + const PixelFormatCMYK + const PixelFormatGRAY + const PixelFormatRGB + const PixelFormatRGBA + const PixelFormatRGBX + const PixelFormatUNKNOWN + const PixelFormatXBGR + const PixelFormatXRGB + type Sampling C.int + const Sampling420 + const Sampling422 + const Sampling444 + const SamplingGray