Merge pull request #250 from fisherking/master

Fix AreaWidth calculation
This commit is contained in:
Tomás Aparicio 2018-12-05 13:06:49 +01:00 committed by GitHub
commit a40dadf4fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -273,7 +273,7 @@ func extractOrEmbedImage(image *C.VipsImage, o Options) (*C.VipsImage, error) {
break
case o.Top != 0 || o.Left != 0 || o.AreaWidth != 0 || o.AreaHeight != 0:
if o.AreaWidth == 0 {
o.AreaHeight = o.Width
o.AreaWidth = o.Width
}
if o.AreaHeight == 0 {
o.AreaHeight = o.Height