Expose JPEG 2000 oneshot decoder option #4262

Requires libvips compiled with support for JP2 images

Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>
This commit is contained in:
Michael B. Klein
2024-11-12 11:32:41 -06:00
committed by Lovell Fuller
parent 01f6cbbaee
commit 751f9992c4
11 changed files with 67 additions and 7 deletions

2
lib/index.d.ts vendored
View File

@@ -1009,6 +1009,8 @@ declare namespace sharp {
level?: number | undefined;
/** 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. */
pdfBackground?: Colour | Color | undefined;
/** Set to `true` to load JPEG 2000 images using [oneshot mode](https://github.com/libvips/libvips/issues/4205) */
jp2Oneshot?: boolean | undefined;
/** Set to `true` to read all frames/pages of an animated image (equivalent of setting `pages` to `-1`). (optional, default false) */
animated?: boolean | undefined;
/** Describes raw pixel input image data. See raw() for pixel ordering. */