Documentation ¶
Index ¶
- Variables
- func FileOpen(filename string) (*os.File, error)
- func GetCMYKpicColor(file *PicFile, x, y int) []int
- func GetGraypicColor(file *PicFile, x, y int) []int
- func GetRGBpicColor(file *PicFile, x, y int) []int
- func GetYcbcrpicColor(file *PicFile, x, y int) []int
- type ImageType
- type NewPic
- type PicFile
- func (p *PicFile) Format() string
- func (p *PicFile) GetPixel(x, y int) []int
- func (p *PicFile) Img2Array() [][][3]float32
- func (p *PicFile) ImgSplit() (r, g, b *NewPic)
- func (p *PicFile) Mode() string
- func (p *PicFile) Resize(width, height int) *PicFile
- func (p *PicFile) Save(file string)
- func (p *PicFile) Show()
- func (p *PicFile) Size() (int, int)
Constants ¶
This section is empty.
Variables ¶
View Source
var ImageTypes = map[ImageType]string{ JPEG: "jpeg", PNG: "png", WEBP: "webp", TIFF: "tiff", GIF: "gif", PDF: "pdf", SVG: "svg", MAGICK: "magick", HEIF: "heif", AVIF: "avif", }
ImageTypes stores as pairs of image types supported and its alias names.
Functions ¶
func GetCMYKpicColor ¶
GetCMYKpicColor returns CMYK of the pixel at (x, y).Not Alpha
func GetGraypicColor ¶
GetGraypicColor returns Gray of the pixel at (x, y).Not Alpha
func GetRGBpicColor ¶
GetRGBpicColor returns RGB of the pixel at (x, y).Not Alpha
func GetYcbcrpicColor ¶
GetYcbcrpicColor returns YCbCr of the pixel at (x, y).Not Alpha
Types ¶
type ImageType ¶
type ImageType int
ImageType represents an image type value.
const ( // UNKNOWN represents an unknow image type value. UNKNOWN ImageType = iota // JPEG represents the JPEG image type. JPEG // WEBP represents the WEBP image type. WEBP // PNG represents the PNG image type. PNG // TIFF represents the TIFF image type. TIFF // GIF represents the GIF image type. GIF // PDF represents the PDF type. PDF // SVG represents the SVG image type. SVG // MAGICK represents the libmagick compatible genetic image type. MAGICK // HEIF represents the HEIC/HEIF/HVEC image type HEIF // AVIF represents the AVIF image type. AVIF )
type NewPic ¶
type NewPic struct {
// contains filtered or unexported fields
}
func NewPicFile ¶
NewPicFile returns a new PicFile.
type PicFile ¶
type PicFile struct {
// contains filtered or unexported fields
}
func ImageFile ¶
ImageFile Import the image and determine the type according to the suffix only jpg or png
Click to show internal directories.
Click to hide internal directories.