Compare commits

..

3 Commits

Author SHA1 Message Date
Kleis Auke Wolthuizen
3609c61a22
Tests: fix JP2 suite with global libvips (#4477) 2025-11-15 10:55:58 +00:00
Jiralite
dc6820b49f
TypeScript: tag deprecated constructor properties (#4474) 2025-11-10 16:41:22 +00:00
Sylvester Keil
f2a49d19c9
Fix invalid escape sequence (#4471) 2025-11-07 11:39:39 +00:00
3 changed files with 8 additions and 8 deletions

6
lib/index.d.ts vendored
View File

@ -1028,11 +1028,11 @@ declare namespace sharp {
openSlide?: OpenSlideInputOptions | undefined;
/** JPEG 2000 specific input options */
jp2?: Jp2InputOptions | undefined;
/** Deprecated: use tiff.subifd instead */
/** @deprecated Use {@link SharpOptions.tiff} instead */
subifd?: number | undefined;
/** Deprecated: use pdf.background instead */
/** @deprecated Use {@link SharpOptions.pdf} instead */
pdfBackground?: Colour | Color | undefined;
/** Deprecated: use openSlide.level instead */
/** @deprecated Use {@link SharpOptions.openSlide} instead */
level?: number | 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;

View File

@ -120,7 +120,7 @@
'conditions': [
['use_global_libvips == "true"', {
# Use pkg-config for include and lib
'include_dirs': ['<!@(PKG_CONFIG_PATH="<(pkg_config_path)" pkg-config --cflags-only-I vips-cpp vips glib-2.0 | sed s\/-I//g)'],
'include_dirs': ['<!@(PKG_CONFIG_PATH="<(pkg_config_path)" pkg-config --cflags-only-I vips-cpp vips glib-2.0 | sed s/-I//g)'],
'libraries': ['<!@(PKG_CONFIG_PATH="<(pkg_config_path)" pkg-config --libs vips-cpp)'],
'defines': [
'SHARP_USE_GLOBAL_LIBVIPS'

View File

@ -45,11 +45,11 @@ describe('JP2 output', () => {
assert.strictEqual('png', info.format);
assert.strictEqual(8, info.width);
assert.strictEqual(15, info.height);
assert.strictEqual(4, info.channels);
assert.strictEqual(3, info.channels);
});
});
it('JP2 quality', (done) => {
it('JP2 quality', (_t, done) => {
sharp(fixtures.inputJp2)
.resize(320, 240)
.jp2({ quality: 70 })
@ -65,7 +65,7 @@ describe('JP2 output', () => {
});
});
it('Without chroma subsampling generates larger file', (done) => {
it('Without chroma subsampling generates larger file', (_t, done) => {
// First generate with chroma subsampling (default)
sharp(fixtures.inputJp2)
.resize(320, 240)
@ -111,7 +111,7 @@ describe('JP2 output', () => {
it('Invalid JP2 chromaSubsampling value throws error', () => {
assert.throws(
() => sharp().jp2({ chromaSubsampling: '4:2:2' }),
/Expected one of 4:2:0, 4:4:4 but received 4:2:2 of type string/
/Expected one of: 4:2:0, 4:4:4 for chromaSubsampling but received 4:2:2 of type string/
);
});
}