mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 15:25:07 +01:00
Base maximum output dimensions on limitation of format
This commit is contained in:
@@ -97,7 +97,7 @@ const Sharp = function (input, options) {
|
||||
this.options = {
|
||||
// input options
|
||||
sequentialRead: false,
|
||||
limitInputPixels: maximum.pixels,
|
||||
limitInputPixels: Math.pow(0x3FFF, 2),
|
||||
// ICC profiles
|
||||
iccProfilePath: path.join(__dirname, 'icc') + path.sep,
|
||||
// resize options
|
||||
@@ -189,18 +189,6 @@ const Sharp = function (input, options) {
|
||||
};
|
||||
util.inherits(Sharp, stream.Duplex);
|
||||
|
||||
/**
|
||||
* Pixel limits.
|
||||
* @member
|
||||
* @private
|
||||
*/
|
||||
const maximum = {
|
||||
width: 0x3FFF,
|
||||
height: 0x3FFF,
|
||||
pixels: Math.pow(0x3FFF, 2)
|
||||
};
|
||||
Sharp.maximum = maximum;
|
||||
|
||||
/**
|
||||
* An EventEmitter that emits a `change` event when a task is either:
|
||||
* - queued, waiting for _libuv_ to provide a worker thread
|
||||
|
||||
Reference in New Issue
Block a user