mirror of
https://github.com/lovell/sharp.git
synced 2025-12-18 23:05:04 +01:00
Docs: clarify that metadata is based on input, not output
This commit is contained in:
@@ -290,7 +290,11 @@ function _isStreamInput () {
|
||||
}
|
||||
|
||||
/**
|
||||
* Fast access to (uncached) image metadata without decoding any compressed image data.
|
||||
* Fast access to (uncached) image metadata without decoding any compressed pixel data.
|
||||
*
|
||||
* This is taken from the header of the input image.
|
||||
* It does not include operations, such as resize, to be applied to the output image.
|
||||
*
|
||||
* A `Promise` is returned when `callback` is not provided.
|
||||
*
|
||||
* - `format`: Name of decoder used to decompress image data e.g. `jpeg`, `png`, `webp`, `gif`, `svg`
|
||||
@@ -322,6 +326,9 @@ function _isStreamInput () {
|
||||
* - `tifftagPhotoshop`: Buffer containing raw TIFFTAG_PHOTOSHOP data, if present
|
||||
*
|
||||
* @example
|
||||
* const metadata = await sharp(input).metadata();
|
||||
*
|
||||
* @example
|
||||
* const image = sharp(inputJpg);
|
||||
* image
|
||||
* .metadata()
|
||||
|
||||
Reference in New Issue
Block a user