feat(image): add method to retrieve the image

This commit is contained in:
Tomas Aparicio 2015-04-08 10:45:25 +02:00
parent b87fe15224
commit 2ae1da85ff
2 changed files with 7 additions and 2 deletions

View file

@ -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}