mirror of
https://github.com/lovell/sharp.git
synced 2025-12-06 12:01:41 +01:00
Compare commits
No commits in common. "main" and "v0.34.5" have entirely different histories.
6
lib/index.d.ts
vendored
6
lib/index.d.ts
vendored
@ -1028,11 +1028,11 @@ declare namespace sharp {
|
||||
openSlide?: OpenSlideInputOptions | undefined;
|
||||
/** JPEG 2000 specific input options */
|
||||
jp2?: Jp2InputOptions | undefined;
|
||||
/** @deprecated Use {@link SharpOptions.tiff} instead */
|
||||
/** Deprecated: use tiff.subifd instead */
|
||||
subifd?: number | undefined;
|
||||
/** @deprecated Use {@link SharpOptions.pdf} instead */
|
||||
/** Deprecated: use pdf.background instead */
|
||||
pdfBackground?: Colour | Color | undefined;
|
||||
/** @deprecated Use {@link SharpOptions.openSlide} instead */
|
||||
/** Deprecated: use openSlide.level 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;
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -45,11 +45,11 @@ describe('JP2 output', () => {
|
||||
assert.strictEqual('png', info.format);
|
||||
assert.strictEqual(8, info.width);
|
||||
assert.strictEqual(15, info.height);
|
||||
assert.strictEqual(3, info.channels);
|
||||
assert.strictEqual(4, info.channels);
|
||||
});
|
||||
});
|
||||
|
||||
it('JP2 quality', (_t, done) => {
|
||||
it('JP2 quality', (done) => {
|
||||
sharp(fixtures.inputJp2)
|
||||
.resize(320, 240)
|
||||
.jp2({ quality: 70 })
|
||||
@ -65,7 +65,7 @@ describe('JP2 output', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('Without chroma subsampling generates larger file', (_t, done) => {
|
||||
it('Without chroma subsampling generates larger file', (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 for chromaSubsampling but received 4:2:2 of type string/
|
||||
/Expected one of 4:2:0, 4:4:4 but received 4:2:2 of type string/
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user