mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-07 21:48:13 -08:00
Fix review
This commit is contained in:
parent
1547c623a9
commit
03d98b00ba
2 changed files with 5 additions and 7 deletions
4
vips.go
4
vips.go
|
|
@ -564,7 +564,7 @@ func vipsExtract(image *C.VipsImage, left, top, width, height int) (*C.VipsImage
|
|||
var buf *C.VipsImage
|
||||
defer C.g_object_unref(C.gpointer(image))
|
||||
|
||||
if width > MaxSize() || height > MaxSize() {
|
||||
if width > maxSize || height > maxSize {
|
||||
return nil, errors.New("Maximum image size exceeded")
|
||||
}
|
||||
|
||||
|
|
@ -581,7 +581,7 @@ func vipsSmartCrop(image *C.VipsImage, width, height int) (*C.VipsImage, error)
|
|||
var buf *C.VipsImage
|
||||
defer C.g_object_unref(C.gpointer(image))
|
||||
|
||||
if width > MaxSize() || height > MaxSize() {
|
||||
if width > maxSize || height > maxSize {
|
||||
return nil, errors.New("Maximum image size exceeded")
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue