Documentation ¶
Overview ¶
Package imgo process the image and get info
Index ¶
- func ByteToImg(b []byte) (image.Image, error)
- func ConvertToRGBA(img image.Image) (r *image.RGBA)
- func Create(path string) (*os.File, error)
- func Decode(f *os.File, fm string) (image.Image, error)
- func DecodeFile(fileName string) (image.Image, string, error)
- func Destroy(filePath string) error
- func Encode(out io.Writer, subImg image.Image, fm string, quality ...int) error
- func EncodeImg(m image.Image) (pix []uint8, stride int, err error)
- func GetSize(imagePath string) (int, int, error)
- func Height(img image.Image) int
- func ImgToBytes(path string) ([]byte, error)
- func IsBlack(c color.Color) bool
- func ModTime(filePath string) (int64, error)
- func OpenBase64(file string) (encode string, err error)
- func PngToBytes(path string) ([]byte, error)
- func Read(path string) (image.Image, error)
- func ReadPNG(path string) (image.Image, error)
- func Rename(filePath, to string) error
- func Save(path string, img image.Image, quality ...int) error
- func SaveByBase64(encode string, path string) error
- func SaveByte(path string, dist []byte) error
- func SaveToJpeg(path string, img image.Image, quality ...int) error
- func SaveToPNG(path string, img image.Image) error
- func StrToImg(data string) (image.Image, error)
- func ToByte(img image.Image, fm ...string) []byte
- func ToBytes(img image.Image, fm string) ([]byte, error)
- func ToBytesPng(img image.Image) ([]byte, error)
- func ToString(img image.Image, fm ...string) string
- func ToStringImg(img image.Image) (result string)
- func Width(img image.Image) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToRGBA ¶ added in v0.30.0
ConvertToRGBA convert the image.Image to *image.RGBA
func DecodeFile ¶
DecodeFile decodes image file
func OpenBase64 ¶ added in v0.30.0
OpenBase64 return a base64 string from image file
func SaveByBase64 ¶ added in v0.30.0
SaveByBase64 create a image file from base64 string
func SaveToJpeg ¶ added in v0.11.0
SaveToJpeg create a jpeg file with the image.Image
func ToBytesPng ¶
ToBytesPng trans image.Image to []byte
func ToStringImg ¶ added in v0.20.0
ToStringImg tostring image.Image
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.