mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
TypeScript: add missing WebpPresetEnum (#3748)
This commit is contained in:
@@ -651,3 +651,13 @@ sharp(input).composite([
|
||||
unlimited: true,
|
||||
}
|
||||
]);
|
||||
|
||||
// Support for webp preset in types
|
||||
// https://github.com/lovell/sharp/issues/3747
|
||||
sharp('input.tiff').webp({ preset: 'photo' }).toFile('out.webp');
|
||||
sharp('input.tiff').webp({ preset: 'picture' }).toFile('out.webp');
|
||||
sharp('input.tiff').webp({ preset: 'icon' }).toFile('out.webp');
|
||||
sharp('input.tiff').webp({ preset: 'drawing' }).toFile('out.webp');
|
||||
sharp('input.tiff').webp({ preset: 'text' }).toFile('out.webp');
|
||||
sharp('input.tiff').webp({ preset: 'default' }).toFile('out.webp');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user