Documentation ¶
Index ¶
- Constants
- Variables
- func Clone(img image.Image) *image.NRGBA
- func Resize(i image.Image, width, height int, filter ResampleFilter) *image.NRGBA
- type Image
- func (i *Image) GetHash() string
- func (i *Image) Height() int
- func (i *Image) Height64() float64
- func (i *Image) Negative() (image *Image)
- func (i *Image) Resize(width, height int, params ...ResampleFilter) (image *Image)
- func (i *Image) ResizeCrop(width, height int, params ...ResampleFilter) (img *Image)
- func (i *Image) ResizeIn(width, height int, params ...ResampleFilter) *Image
- func (i *Image) ResizeMax(width, height int, params ...ResampleFilter) *Image
- func (i *Image) ResizeOut(width, height int, params ...ResampleFilter) *Image
- func (i *Image) Save(params ...string) (err error)
- func (i *Image) SetBmp() *Image
- func (i *Image) SetFormat(format string)
- func (i *Image) SetGif() *Image
- func (i *Image) SetJpeg() *Image
- func (i *Image) SetPNGBestCompression() *Image
- func (i *Image) SetPNGBestSpeed() *Image
- func (i *Image) SetPNGNoCompression() *Image
- func (i *Image) SetPng() *Image
- func (i *Image) SetQuality(quality int) *Image
- func (i *Image) SetTiff() *Image
- func (i *Image) Width() int
- func (i *Image) Width64() float64
- type ResampleFilter
Constants ¶
Variables ¶
View Source
var Formats = [5]string{"tiff", "jpeg", "gif", "png", "bmp"}
Functions ¶
Types ¶
type Image ¶
type Image struct { Image *image.NRGBA Address string Format string Quality int Error error // contains filtered or unexported fields }
func (*Image) Resize ¶
func (i *Image) Resize(width, height int, params ...ResampleFilter) (image *Image)
func (*Image) ResizeCrop ¶
func (i *Image) ResizeCrop(width, height int, params ...ResampleFilter) (img *Image)
func (*Image) ResizeIn ¶
func (i *Image) ResizeIn(width, height int, params ...ResampleFilter) *Image
Картинка меньше прямоугольника
func (*Image) ResizeMax ¶
func (i *Image) ResizeMax(width, height int, params ...ResampleFilter) *Image
Картинка меньше прямоугольника, но если изначальный размер ещё меньше то картинка не растягивается
func (*Image) ResizeOut ¶
func (i *Image) ResizeOut(width, height int, params ...ResampleFilter) *Image
Картинка больше прямоугольника
func (*Image) SetPNGBestCompression ¶
func (*Image) SetPNGBestSpeed ¶
func (*Image) SetPNGNoCompression ¶
func (*Image) SetQuality ¶
type ResampleFilter ¶
var BSpline ResampleFilter
var Bartlett ResampleFilter
var Blackman ResampleFilter
var Box ResampleFilter
var CatmullRom ResampleFilter
var Cosine ResampleFilter
var Gaussian ResampleFilter
var Hamming ResampleFilter
var Hann ResampleFilter
var Hermite ResampleFilter
var Lanczos ResampleFilter
var Linear ResampleFilter
var MitchellNetravali ResampleFilter
var NearestNeighbor ResampleFilter
var Welch ResampleFilter
Click to show internal directories.
Click to hide internal directories.