Versions in this module Expand all Collapse all v0 v0.0.1 Sep 25, 2023 Changes in this version + const ExifTagOrientation + var ErrNoAlpha = errors.New("Image has no alpha channel") + func Compress(img *Image, params CompressParams) ([]byte, error) + func NChan(pf PixelFormat) int + func Resize(src, dst *Image) error + func Transform(jpegBytes []byte, x, y, w, h int, flags Flags) ([]byte, error) + type CompressParams struct + Flags Flags + Quality int + Sampling Sampling + func MakeCompressParams(sampling Sampling, quality int, flags Flags) CompressParams + type ExifData struct + func LoadExif(jpeg []byte) (*ExifData, error) + func (x *ExifData) GetOrientation() int + func (x *ExifData) Save(w io.Writer) error + func (x *ExifData) SetOrientation(orient int) error + type Flags C.int + const FlagAccurateDCT + const FlagBottomUp + const FlagFastDCT + const FlagFastUpsample + const FlagNoRealloc + const FlagProgressive + const FlagStopOnWarning + type Image struct + Format PixelFormat + Height int + Pixels []byte + Premultiplied bool + Stride int + Width int + func Decompress(encoded []byte, outFormat PixelFormat) (*Image, error) + func FromImage(src image.Image, allowDeepClone bool) (*Image, error) + func NewImage(width, height int, format PixelFormat) *Image + func ResizeNew(src *Image, dstWidth, dstHeight int) *Image + func UnrotateExif(exifOrientation int, src *Image) (*Image, error) + func WrapImage(width, height int, format PixelFormat, pixels []byte) *Image + func WrapImageStrided(width, height int, format PixelFormat, pixels []byte, stride int) *Image + func (dst *Image) CopyImage(src *Image, dstX1, dstY1 int) error + func (dst *Image) CopyImageRect(src *Image, srcX1, srcY1, srcX2, srcY2 int, dstX1, dstY1 int) error + func (img *Image) AvgColor() []uint8 + func (img *Image) ChannelSpliter() []byte + func (img *Image) Clone() *Image + func (img *Image) Matte(r, g, b uint8) + func (img *Image) NChan() int + func (img *Image) Premultiply() + func (img *Image) ResizeNew(w, h int) *Image + func (img *Image) ToImage() (image.Image, error) + func (img *Image) ToRGB() *Image + 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 Sampling411 + const Sampling420 + const Sampling422 + const Sampling440 + const Sampling444 + const SamplingGray + func (v Sampling) GetMCUHeight() int + func (v Sampling) GetMCUWidth() int