Documentation
¶
Index ¶
- Constants
- Variables
- func CacheGetMaxFiles() uint
- func CacheGetMaxMem() uint64
- func CacheGetSize() uint
- func Cleanup()
- func Shutdown()
- func TrackedGetAllocs() uint
- func TrackedGetFiles() uint
- func TrackedGetMem() uint64
- func TrackedGetMemHighwater() uint64
- type Gravity
- type HEIFCompressionType
- type ImageFormat
- type VipsImage
- func (img *VipsImage) AddWatermark(wm *VipsImage, pt image.Point, opacity float64) error
- func (img *VipsImage) Blur(sigma float32) error
- func (img *VipsImage) Clear()
- func (img *VipsImage) CopyMemory() error
- func (img *VipsImage) Crop(dstW, dstH int, pt image.Point) error
- func (img *VipsImage) EnsureAlpha() error
- func (img *VipsImage) Extract(out *VipsImage, pt image.Point, w, h int) error
- func (img *VipsImage) Fill(dstW, dstH int, pt image.Point) error
- func (img *VipsImage) Flip() error
- func (img *VipsImage) HasAlpha() bool
- func (img *VipsImage) Height() int
- func (img *VipsImage) IsAnimated() bool
- func (img *VipsImage) Resize(scale float64, hasAlpha bool) error
- func (img *VipsImage) Rotate(angle int) error
- func (img *VipsImage) Save(imgType ImageFormat, opts encodeConfig) ([]byte, error)
- func (img *VipsImage) SaveAsIco() ([]byte, error)
- func (img *VipsImage) SetInt(key string, val int)
- func (img *VipsImage) Sharpen(sigma float32) error
- func (img *VipsImage) SmartCrop(w, h int) error
- func (img *VipsImage) Strip() error
- func (img *VipsImage) Trim(threshold float64, smart bool, color color.RGBA, equalHor bool, equalVer bool) error
- func (img *VipsImage) Width() int
Constants ¶
View Source
const ( Unknown = ImageFormat(C.UNKNOWN) AVIF = ImageFormat(C.AVIF) BMP = ImageFormat(C.BMP) GIF = ImageFormat(C.GIF) HEIF = ImageFormat(C.HEIF) ICO = ImageFormat(C.ICO) JPEG = ImageFormat(C.JPEG) PDF = ImageFormat(C.PDF) PNG = ImageFormat(C.PNG) SVG = ImageFormat(C.SVG) TIFF = ImageFormat(C.TIFF) WEBP = ImageFormat(C.WEBP) HEIF_COMPRESSION_HEVC = HEIFCompressionType(C.VIPS_FOREIGN_HEIF_COMPRESSION_HEVC) HEIF_COMPRESSION_AVC = HEIFCompressionType(C.VIPS_FOREIGN_HEIF_COMPRESSION_AVC) HEIF_COMPRESSION_JPEG = HEIFCompressionType(C.VIPS_FOREIGN_HEIF_COMPRESSION_JPEG) )
View Source
const Version = string(C.VIPS_VERSION)
Variables ¶
View Source
var ( ErrUnsupportedImageFormat = fmt.Errorf("unsupported image file format") ErrInvalidFileFormat = fmt.Errorf("invalid file format") )
View Source
var DefaultEncodeConfig = encodeConfig{ // contains filtered or unexported fields }
Functions ¶
func CacheGetMaxFiles ¶
func CacheGetMaxFiles() uint
func CacheGetMaxMem ¶
func CacheGetMaxMem() uint64
func CacheGetSize ¶
func CacheGetSize() uint
func TrackedGetAllocs ¶
func TrackedGetAllocs() uint
func TrackedGetFiles ¶
func TrackedGetFiles() uint
func TrackedGetMem ¶
func TrackedGetMem() uint64
func TrackedGetMemHighwater ¶
func TrackedGetMemHighwater() uint64
Types ¶
type Gravity ¶
type Gravity int
func (Gravity) MarshalText ¶
func (Gravity) PointWatermark ¶
func (*Gravity) UnmarshalText ¶
type HEIFCompressionType ¶
type HEIFCompressionType int
type ImageFormat ¶
type ImageFormat int
func FormatByMagicNumber ¶
func FormatByMagicNumber(buf []byte) ImageFormat
func (ImageFormat) Ext ¶
func (imgFmt ImageFormat) Ext() string
func (ImageFormat) MarshalText ¶
func (imgFmt ImageFormat) MarshalText() ([]byte, error)
func (ImageFormat) String ¶
func (imgFmt ImageFormat) String() string
func (*ImageFormat) UnmarshalText ¶
func (imgFmt *ImageFormat) UnmarshalText(val []byte) error
type VipsImage ¶
type VipsImage struct {
// contains filtered or unexported fields
}
func LoadFromFile ¶
func LoadFromImage ¶
func (*VipsImage) AddWatermark ¶
func (*VipsImage) CopyMemory ¶
func (*VipsImage) EnsureAlpha ¶
func (*VipsImage) IsAnimated ¶
func (*VipsImage) Save ¶
func (img *VipsImage) Save(imgType ImageFormat, opts encodeConfig) ([]byte, error)
func (*VipsImage) SmartCrop ¶
VipsJpeg: out of order read at line XXXX https://github.com/libvips/libvips/issues/639#issuecomment-294513915
Click to show internal directories.
Click to hide internal directories.