mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02:00
Docs: metadata returns resolutionUnit, if present
This commit is contained in:
parent
ec17d7f580
commit
47ae1f52db
@ -28,6 +28,7 @@ A `Promise` is returned when `callback` is not provided.
|
|||||||
* `subifds`: Number of Sub Image File Directories in an OME-TIFF image
|
* `subifds`: Number of Sub Image File Directories in an OME-TIFF image
|
||||||
* `background`: Default background colour, if present, for PNG (bKGD) and GIF images, either an RGB Object or a single greyscale value
|
* `background`: Default background colour, if present, for PNG (bKGD) and GIF images, either an RGB Object or a single greyscale value
|
||||||
* `compression`: The encoder used to compress an HEIF file, `av1` (AVIF) or `hevc` (HEIC)
|
* `compression`: The encoder used to compress an HEIF file, `av1` (AVIF) or `hevc` (HEIC)
|
||||||
|
* `resolutionUnit`: The unit of resolution (density), either `inch` or `cm`, if present
|
||||||
* `hasProfile`: Boolean indicating the presence of an embedded ICC profile
|
* `hasProfile`: Boolean indicating the presence of an embedded ICC profile
|
||||||
* `hasAlpha`: Boolean indicating the presence of an alpha transparency channel
|
* `hasAlpha`: Boolean indicating the presence of an alpha transparency channel
|
||||||
* `orientation`: Number value of the EXIF Orientation header, if present
|
* `orientation`: Number value of the EXIF Orientation header, if present
|
||||||
|
@ -316,6 +316,7 @@ function _isStreamInput () {
|
|||||||
* - `subifds`: Number of Sub Image File Directories in an OME-TIFF image
|
* - `subifds`: Number of Sub Image File Directories in an OME-TIFF image
|
||||||
* - `background`: Default background colour, if present, for PNG (bKGD) and GIF images, either an RGB Object or a single greyscale value
|
* - `background`: Default background colour, if present, for PNG (bKGD) and GIF images, either an RGB Object or a single greyscale value
|
||||||
* - `compression`: The encoder used to compress an HEIF file, `av1` (AVIF) or `hevc` (HEIC)
|
* - `compression`: The encoder used to compress an HEIF file, `av1` (AVIF) or `hevc` (HEIC)
|
||||||
|
* - `resolutionUnit`: The unit of resolution (density), either `inch` or `cm`, if present
|
||||||
* - `hasProfile`: Boolean indicating the presence of an embedded ICC profile
|
* - `hasProfile`: Boolean indicating the presence of an embedded ICC profile
|
||||||
* - `hasAlpha`: Boolean indicating the presence of an alpha transparency channel
|
* - `hasAlpha`: Boolean indicating the presence of an alpha transparency channel
|
||||||
* - `orientation`: Number value of the EXIF Orientation header, if present
|
* - `orientation`: Number value of the EXIF Orientation header, if present
|
||||||
|
@ -1443,7 +1443,6 @@ Napi::Value pipeline(const Napi::CallbackInfo& info) {
|
|||||||
baton->affineOdx = sharp::AttrAsDouble(options, "affineOdx");
|
baton->affineOdx = sharp::AttrAsDouble(options, "affineOdx");
|
||||||
baton->affineOdy = sharp::AttrAsDouble(options, "affineOdy");
|
baton->affineOdy = sharp::AttrAsDouble(options, "affineOdy");
|
||||||
baton->affineInterpolator = vips::VInterpolate::new_from_name(sharp::AttrAsStr(options, "affineInterpolator").data());
|
baton->affineInterpolator = vips::VInterpolate::new_from_name(sharp::AttrAsStr(options, "affineInterpolator").data());
|
||||||
|
|
||||||
baton->removeAlpha = sharp::AttrAsBool(options, "removeAlpha");
|
baton->removeAlpha = sharp::AttrAsBool(options, "removeAlpha");
|
||||||
baton->ensureAlpha = sharp::AttrAsDouble(options, "ensureAlpha");
|
baton->ensureAlpha = sharp::AttrAsDouble(options, "ensureAlpha");
|
||||||
if (options.Has("boolean")) {
|
if (options.Has("boolean")) {
|
||||||
@ -1555,13 +1554,10 @@ Napi::Value pipeline(const Napi::CallbackInfo& info) {
|
|||||||
sharp::AttrAsStr(options, "heifCompression").data()));
|
sharp::AttrAsStr(options, "heifCompression").data()));
|
||||||
baton->heifEffort = sharp::AttrAsUint32(options, "heifEffort");
|
baton->heifEffort = sharp::AttrAsUint32(options, "heifEffort");
|
||||||
baton->heifChromaSubsampling = sharp::AttrAsStr(options, "heifChromaSubsampling");
|
baton->heifChromaSubsampling = sharp::AttrAsStr(options, "heifChromaSubsampling");
|
||||||
|
|
||||||
|
|
||||||
// Raw output
|
// Raw output
|
||||||
baton->rawDepth = static_cast<VipsBandFormat>(
|
baton->rawDepth = static_cast<VipsBandFormat>(
|
||||||
vips_enum_from_nick(nullptr, VIPS_TYPE_BAND_FORMAT,
|
vips_enum_from_nick(nullptr, VIPS_TYPE_BAND_FORMAT,
|
||||||
sharp::AttrAsStr(options, "rawDepth").data()));
|
sharp::AttrAsStr(options, "rawDepth").data()));
|
||||||
|
|
||||||
// Animated output properties
|
// Animated output properties
|
||||||
if (sharp::HasAttr(options, "loop")) {
|
if (sharp::HasAttr(options, "loop")) {
|
||||||
baton->loop = sharp::AttrAsUint32(options, "loop");
|
baton->loop = sharp::AttrAsUint32(options, "loop");
|
||||||
@ -1569,7 +1565,6 @@ Napi::Value pipeline(const Napi::CallbackInfo& info) {
|
|||||||
if (sharp::HasAttr(options, "delay")) {
|
if (sharp::HasAttr(options, "delay")) {
|
||||||
baton->delay = sharp::AttrAsInt32Vector(options, "delay");
|
baton->delay = sharp::AttrAsInt32Vector(options, "delay");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tile output
|
// Tile output
|
||||||
baton->tileSize = sharp::AttrAsUint32(options, "tileSize");
|
baton->tileSize = sharp::AttrAsUint32(options, "tileSize");
|
||||||
baton->tileOverlap = sharp::AttrAsUint32(options, "tileOverlap");
|
baton->tileOverlap = sharp::AttrAsUint32(options, "tileOverlap");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user