mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-07 21:48:13 -08:00
feat(image): add method to retrieve the image
This commit is contained in:
parent
b87fe15224
commit
2ae1da85ff
2 changed files with 7 additions and 2 deletions
5
image.go
5
image.go
|
|
@ -124,6 +124,11 @@ func (i *Image) Size() (ImageSize, error) {
|
|||
return Size(i.buffer)
|
||||
}
|
||||
|
||||
// Get image buffer
|
||||
func (i *Image) Image() []byte {
|
||||
return i.buffer
|
||||
}
|
||||
|
||||
// Creates a new image
|
||||
func NewImage(buf []byte) *Image {
|
||||
return &Image{buf}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue