feat(#60): support zero top and left params in extract operation

This commit is contained in:
Tomas Aparicio 2015-10-12 21:36:37 +01:00
parent 89292e7ead
commit b7eaa00f10
4 changed files with 26 additions and 1 deletions

View file

@ -48,6 +48,11 @@ func (i *Image) Extract(top, left, width, height int) ([]byte, error) {
AreaWidth: width,
AreaHeight: height,
}
if top == 0 && left == 0 {
options.Top = -1
}
return i.Process(options)
}