mirror of
https://github.com/go-vgo/robotgo
synced 2026-05-24 02:08:33 +00:00
add SaveJpeg() function support
This commit is contained in:
parent
871ec1a2c4
commit
aae0a14e7f
1 changed files with 5 additions and 0 deletions
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 a new issue