1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 11:07:40 +08:00

add func: NewImage([]byte).

This commit is contained in:
Mrs4s 2020-07-10 16:54:52 +08:00
parent 7302ac5f7e
commit 4dc16b45ba

View File

@ -34,6 +34,12 @@ func NewNetImage(filename, url string) *ImageElement {
} }
} }
func NewImage(data []byte) *ImageElement {
return &ImageElement{
Data: data,
}
}
func NewGroupImage(id string, md5 []byte) *GroupImageElement { func NewGroupImage(id string, md5 []byte) *GroupImageElement {
return &GroupImageElement{ return &GroupImageElement{
ImageId: id, ImageId: id,