Add Image.Length()

Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
This commit is contained in:
Yoan Blanc 2017-06-22 16:44:54 +02:00
parent 75a5d927d3
commit a792146837
No known key found for this signature in database
GPG key ID: 6058CF4574298812
2 changed files with 17 additions and 1 deletions

View file

@ -217,7 +217,12 @@ func (i *Image) Size() (ImageSize, error) {
return Size(i.buffer)
}
// Image returns the current resultant image image buffer.
// Image returns the current resultant image buffer.
func (i *Image) Image() []byte {
return i.buffer
}
// Length returns the size in bytes of the image buffer.
func (i *Image) Length() int {
return len(i.buffer)
}