mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 15:25:07 +01:00
Deprecate limitInputPixels and sequentialRead, move to input options
This commit is contained in:
@@ -86,6 +86,11 @@ const debuglog = util.debuglog('sharp');
|
||||
* @param {Object} [options] - if present, is an Object with optional attributes.
|
||||
* @param {Boolean} [options.failOnError=true] - by default halt processing and raise an error when loading invalid images.
|
||||
* Set this flag to `false` if you'd rather apply a "best effort" to decode images, even if the data is corrupt or invalid.
|
||||
* @param {Number|Boolean} [options.limitInputPixels=268402689] - Do not process input images where the number of pixels
|
||||
* (width x height) exceeds this limit. Assumes image dimensions contained in the input metadata can be trusted.
|
||||
* An integral Number of pixels, zero or false to remove limit, true to use default limit of 268402689 (0x3FFF x 0x3FFF).
|
||||
* @param {Boolean} [options.sequentialRead=false] - Set this to `true` to use sequential rather than random access where possible.
|
||||
* This can reduce memory usage and might improve performance on some systems.
|
||||
* @param {Number} [options.density=72] - number representing the DPI for vector images.
|
||||
* @param {Number} [options.pages=1] - number of pages to extract for multi-page input (GIF, TIFF, PDF), use -1 for all pages.
|
||||
* @param {Number} [options.page=0] - page number to start extracting from for multi-page input (GIF, TIFF, PDF), zero based.
|
||||
@@ -110,9 +115,6 @@ const Sharp = function (input, options) {
|
||||
}
|
||||
stream.Duplex.call(this);
|
||||
this.options = {
|
||||
// input options
|
||||
sequentialRead: false,
|
||||
limitInputPixels: Math.pow(0x3FFF, 2),
|
||||
// resize options
|
||||
topOffsetPre: -1,
|
||||
leftOffsetPre: -1,
|
||||
|
||||
Reference in New Issue
Block a user