mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-05-31 06:13:55 +00:00
add SaveJpeg() function support
This commit is contained in:
parent
871ec1a2c4
commit
aae0a14e7f
5
img.go
5
img.go
@ -37,6 +37,11 @@ func SavePng(img image.Image, path string) error {
|
||||
return imgo.SaveToPNG(path, img)
|
||||
}
|
||||
|
||||
// SaveJpeg save the image by image.Image
|
||||
func SaveJpeg(img image.Image, path string) error {
|
||||
return imgo.SaveToJpeg(path, img)
|
||||
}
|
||||
|
||||
// ToByteImg convert image.Image to []byte
|
||||
func ToByteImg(img image.Image) []byte {
|
||||
return imgo.ToByteImg(img)
|
||||
|
Loading…
Reference in New Issue
Block a user