mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Nest format-specific constructor params (deprecate at top-level)
- `subifd` -> `tiff.subifd` - `level` -> `openSlide.level` - `pdfBackground` -> `pdf.background`
This commit is contained in:
@@ -435,9 +435,6 @@ sharp('input.jpg').clahe({ width: 10, height: 10, maxSlope: 5 }).toFile('outfile
|
||||
// Support `unlimited` input option
|
||||
sharp('input.png', { unlimited: true }).resize(320, 240).toFile('outfile.png');
|
||||
|
||||
// Support `subifd` input option for tiffs
|
||||
sharp('input.tiff', { subifd: 3 }).resize(320, 240).toFile('outfile.png');
|
||||
|
||||
// Support creating with noise
|
||||
sharp({
|
||||
create: {
|
||||
@@ -720,13 +717,19 @@ sharp(input).composite([
|
||||
}
|
||||
])
|
||||
|
||||
// Support format-specific input options
|
||||
const colour: sharp.Colour = '#fff';
|
||||
const color: sharp.Color = '#fff';
|
||||
sharp({ pdfBackground: colour });
|
||||
sharp({ pdfBackground: color });
|
||||
|
||||
sharp({ jp2Oneshot: true });
|
||||
sharp({ jp2Oneshot: false });
|
||||
sharp({ pdf: { background: colour } });
|
||||
sharp({ pdf: { background: color } });
|
||||
sharp({ pdfBackground: colour }); // Deprecated
|
||||
sharp({ pdfBackground: color }); // Deprecated
|
||||
sharp({ tiff: { subifd: 3 } });
|
||||
sharp({ subifd: 3 }); // Deprecated
|
||||
sharp({ openSlide: { level: 0 } });
|
||||
sharp({ level: 0 }); // Deprecated
|
||||
sharp({ jp2: { oneshot: true } });
|
||||
sharp({ jp2: { oneshot: false } });
|
||||
|
||||
sharp({ autoOrient: true });
|
||||
sharp({ autoOrient: false });
|
||||
|
||||
Reference in New Issue
Block a user