mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Base maximum output dimensions on limitation of format
This commit is contained in:
@@ -68,10 +68,7 @@ function overlayWith (overlay, options) {
|
||||
}
|
||||
}
|
||||
if (is.defined(options.left) || is.defined(options.top)) {
|
||||
if (
|
||||
is.integer(options.left) && is.inRange(options.left, 0, this.constructor.maximum.width) &&
|
||||
is.integer(options.top) && is.inRange(options.top, 0, this.constructor.maximum.height)
|
||||
) {
|
||||
if (is.integer(options.left) && options.left >= 0 && is.integer(options.top) && options.top >= 0) {
|
||||
this.options.overlayXOffset = options.left;
|
||||
this.options.overlayYOffset = options.top;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user