You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/content/docs/api-constructor.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,7 @@ where the overall height is the `pageHeight` multiplied by the number of `pages`
47
47
|[options.subifd]| <code>number</code> | <code>-1</code> | subIFD (Sub Image File Directory) to extract for OME-TIFF, defaults to main image. |
48
48
|[options.level]| <code>number</code> | <code>0</code> | level to extract from a multi-level input (OpenSlide), zero based. |
49
49
|[options.pdfBackground]| <code>string</code> \| <code>Object</code> || Background colour to use when PDF is partially transparent. Parsed by the [color](https://www.npmjs.org/package/color) module to extract values for red, green, blue and alpha. Requires the use of a globally-installed libvips compiled with support for PDFium, Poppler, ImageMagick or GraphicsMagick. |
50
+
|[options.jp2Oneshot]| <code>boolean</code> | <code>false</code> | Set to `true` to decode tiled JPEG 2000 images in a single operation, improving compatibility. |
50
51
|[options.animated]| <code>boolean</code> | <code>false</code> | Set to `true` to read all frames/pages of an animated image (GIF, WebP, TIFF), equivalent of setting `pages` to `-1`. |
51
52
|[options.raw]| <code>Object</code> || describes raw pixel input image data. See `raw()` for pixel ordering. |
52
53
|[options.raw.width]| <code>number</code> || integral number of pixels wide. |
* @param {number} [options.subifd=-1] - subIFD (Sub Image File Directory) to extract for OME-TIFF, defaults to main image.
157
157
* @param {number} [options.level=0] - level to extract from a multi-level input (OpenSlide), zero based.
158
158
* @param {string|Object} [options.pdfBackground] - Background colour to use when PDF is partially transparent. Parsed by the [color](https://www.npmjs.org/package/color) module to extract values for red, green, blue and alpha. Requires the use of a globally-installed libvips compiled with support for PDFium, Poppler, ImageMagick or GraphicsMagick.
159
+
* @param {boolean} [options.jp2Oneshot=false] - Set to `true` to decode tiled JPEG 2000 images in a single operation, improving compatibility.
159
160
* @param {boolean} [options.animated=false] - Set to `true` to read all frames/pages of an animated image (GIF, WebP, TIFF), equivalent of setting `pages` to `-1`.
160
161
* @param {Object} [options.raw] - describes raw pixel input image data. See `raw()` for pixel ordering.
161
162
* @param {number} [options.raw.width] - integral number of pixels wide.
Copy file name to clipboardExpand all lines: lib/index.d.ts
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1009,6 +1009,8 @@ declare namespace sharp {
1009
1009
level?: number|undefined;
1010
1010
/** Background colour to use when PDF is partially transparent. Requires the use of a globally-installed libvips compiled with support for PDFium, Poppler, ImageMagick or GraphicsMagick. */
1011
1011
pdfBackground?: Colour|Color|undefined;
1012
+
/** Set to `true` to load JPEG 2000 images using [oneshot mode](https://github.com/libvips/libvips/issues/4205) */
1013
+
jp2Oneshot?: boolean|undefined;
1012
1014
/** Set to `true` to read all frames/pages of an animated image (equivalent of setting `pages` to `-1`). (optional, default false) */
1013
1015
animated?: boolean|undefined;
1014
1016
/** Describes raw pixel input image data. See raw() for pixel ordering. */
0 commit comments