Documentation
¶
Index ¶
- func DecodeImage(r io.Reader, format Format) (image.Image, error)
- func IsValidFormat(format Format) bool
- func SaveAsSVG(img image.Image, path string) error
- func SaveImage(img image.Image, path string, format Format) error
- func SaveImageWithQuality(img image.Image, path string, format Format, quality int) error
- type Format
- type Processor
- func (p *Processor) AddBorder(img image.Image, width int, colorStr string) image.Image
- func (p *Processor) AddRoundCorners(img image.Image, radius int) image.Image
- func (p *Processor) AddText(img image.Image, text string, x, y, fontSize int, textColorStr string) image.Image
- func (p *Processor) AddWatermark(img image.Image, text, position string) image.Image
- func (p *Processor) Adjust(img image.Image, brightness, contrast, saturation float64) image.Image
- func (p *Processor) ApplyFilter(img image.Image, filterType string) image.Image
- func (p *Processor) Blend(img1, img2 image.Image, opacity float64) image.Image
- func (p *Processor) Crop(img image.Image, rect image.Rectangle) image.Image
- func (p *Processor) Flip(img image.Image, direction string) image.Image
- func (p *Processor) GetHistogram(img image.Image) map[string][]int
- func (p *Processor) Resize(img image.Image, width, height int) image.Image
- func (p *Processor) Rotate(img image.Image, angle int) image.Image
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeImage ¶
DecodeImage decodes image from reader with specified format
Types ¶
type Format ¶
type Format string
Format represents image format
func DetectFormat ¶
DetectFormat detects image format from reader
func FormatFromExtension ¶
FormatFromExtension gets format from file extension
func FormatFromFilename ¶
FormatFromFilename gets format from filename
type Processor ¶
type Processor struct{}
Processor provides image processing functions
func (*Processor) AddRoundCorners ¶
AddRoundCorners adds rounded corners to an image
func (*Processor) AddText ¶
func (p *Processor) AddText(img image.Image, text string, x, y, fontSize int, textColorStr string) image.Image
AddText adds text to an image
func (*Processor) AddWatermark ¶
AddWatermark adds a text watermark to an image
func (*Processor) ApplyFilter ¶
ApplyFilter applies a filter to an image
func (*Processor) GetHistogram ¶
GetHistogram gets histogram information for an image
Click to show internal directories.
Click to hide internal directories.