mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Docs: update internal and libvips doc links
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
"astro": "astro"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/starlight": "^0.35.2",
|
||||
"astro": "^5.13.5",
|
||||
"starlight-auto-sidebar": "^0.1.2"
|
||||
"@astrojs/starlight": "^0.36.2",
|
||||
"astro": "^5.15.3",
|
||||
"starlight-auto-sidebar": "^0.1.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ title: Channel manipulation
|
||||
|
||||
Remove alpha channels, if any. This is a no-op if the image does not have an alpha channel.
|
||||
|
||||
See also [flatten](/api-operation#flatten).
|
||||
See also [flatten](/api-operation/#flatten).
|
||||
|
||||
|
||||
**Example**
|
||||
|
||||
@@ -80,7 +80,7 @@ as defined by [toColourspace](#tocolourspace).
|
||||
|
||||
| Param | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [colourspace] | <code>string</code> | pipeline colourspace e.g. `rgb16`, `scrgb`, `lab`, `grey16` [...](https://github.com/libvips/libvips/blob/41cff4e9d0838498487a00623462204eb10ee5b8/libvips/iofuncs/enumtypes.c#L774) |
|
||||
| [colourspace] | <code>string</code> | pipeline colourspace e.g. `rgb16`, `scrgb`, `lab`, `grey16` [...](https://www.libvips.org/API/current/enum.Interpretation.html) |
|
||||
|
||||
**Example**
|
||||
```js
|
||||
@@ -123,7 +123,7 @@ By default output image will be web-friendly sRGB, with additional channels inte
|
||||
|
||||
| Param | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [colourspace] | <code>string</code> | output colourspace e.g. `srgb`, `rgb`, `cmyk`, `lab`, `b-w` [...](https://github.com/libvips/libvips/blob/3c0bfdf74ce1dc37a6429bed47fa76f16e2cd70a/libvips/iofuncs/enumtypes.c#L777-L794) |
|
||||
| [colourspace] | <code>string</code> | output colourspace e.g. `srgb`, `rgb`, `cmyk`, `lab`, `b-w` [...](https://www.libvips.org/API/current/enum.Interpretation.html) |
|
||||
|
||||
**Example**
|
||||
```js
|
||||
|
||||
@@ -21,7 +21,7 @@ The `blend` option can be one of `clear`, `source`, `over`, `in`, `out`, `atop`,
|
||||
`hard-light`, `soft-light`, `difference`, `exclusion`.
|
||||
|
||||
More information about blend modes can be found at
|
||||
https://www.libvips.org/API/current/libvips-conversion.html#VipsBlendMode
|
||||
https://www.libvips.org/API/current/enum.BlendMode.html
|
||||
and https://www.cairographics.org/operators/
|
||||
|
||||
|
||||
@@ -64,8 +64,8 @@ and https://www.cairographics.org/operators/
|
||||
| [images[].raw.height] | <code>Number</code> | | |
|
||||
| [images[].raw.channels] | <code>Number</code> | | |
|
||||
| [images[].animated] | <code>boolean</code> | <code>false</code> | Set to `true` to read all frames/pages of an animated image. |
|
||||
| [images[].failOn] | <code>string</code> | <code>"'warning'"</code> | @see [constructor parameters](/api-constructor#parameters) |
|
||||
| [images[].limitInputPixels] | <code>number</code> \| <code>boolean</code> | <code>268402689</code> | @see [constructor parameters](/api-constructor#parameters) |
|
||||
| [images[].failOn] | <code>string</code> | <code>"'warning'"</code> | @see [constructor parameters](/api-constructor/) |
|
||||
| [images[].limitInputPixels] | <code>number</code> \| <code>boolean</code> | <code>268402689</code> | @see [constructor parameters](/api-constructor/) |
|
||||
|
||||
**Example**
|
||||
```js
|
||||
|
||||
@@ -13,7 +13,7 @@ It does not take into consideration any operations to be applied to the output i
|
||||
such as resize or rotate.
|
||||
|
||||
Dimensions in the response will respect the `page` and `pages` properties of the
|
||||
[constructor parameters](/api-constructor#parameters).
|
||||
[constructor parameters](/api-constructor/).
|
||||
|
||||
A `Promise` is returned when `callback` is not provided.
|
||||
|
||||
@@ -21,9 +21,9 @@ A `Promise` is returned when `callback` is not provided.
|
||||
- `size`: Total size of image in bytes, for Stream and Buffer input only
|
||||
- `width`: Number of pixels wide (EXIF orientation is not taken into consideration, see example below)
|
||||
- `height`: Number of pixels high (EXIF orientation is not taken into consideration, see example below)
|
||||
- `space`: Name of colour space interpretation e.g. `srgb`, `rgb`, `cmyk`, `lab`, `b-w` [...](https://www.libvips.org/API/current/VipsImage.html#VipsInterpretation)
|
||||
- `space`: Name of colour space interpretation e.g. `srgb`, `rgb`, `cmyk`, `lab`, `b-w` [...](https://www.libvips.org/API/current/enum.Interpretation.html)
|
||||
- `channels`: Number of bands e.g. `3` for sRGB, `4` for CMYK
|
||||
- `depth`: Name of pixel depth format e.g. `uchar`, `char`, `ushort`, `float` [...](https://www.libvips.org/API/current/VipsImage.html#VipsBandFormat)
|
||||
- `depth`: Name of pixel depth format e.g. `uchar`, `char`, `ushort`, `float` [...](https://www.libvips.org/API/current/enum.BandFormat.html)
|
||||
- `density`: Number of pixels per inch (DPI), if present
|
||||
- `chromaSubsampling`: String containing JPEG chroma subsampling, `4:2:0` or `4:4:4` for RGB, `4:2:0:4` or `4:4:4:4` for CMYK
|
||||
- `isProgressive`: Boolean indicating whether the image is interlaced using a progressive scan
|
||||
|
||||
@@ -179,7 +179,7 @@ When used without parameters, performs a fast, mild sharpen of the output image.
|
||||
When a `sigma` is provided, performs a slower, more accurate sharpen of the L channel in the LAB colour space.
|
||||
Fine-grained control over the level of sharpening in "flat" (m1) and "jagged" (m2) areas is available.
|
||||
|
||||
See [libvips sharpen](https://www.libvips.org/API/current/libvips-convolution.html#vips-sharpen) operation.
|
||||
See [libvips sharpen](https://www.libvips.org/API/current/method.Image.sharpen.html) operation.
|
||||
|
||||
|
||||
**Throws**:
|
||||
|
||||
@@ -201,7 +201,7 @@ const dataWithMergedExif = await sharp(inputWithExif)
|
||||
|
||||
Keep ICC profile from the input image in the output image.
|
||||
|
||||
Where necessary, will attempt to convert the output colour space to match the profile.
|
||||
For non-RGB output use [toColourspace](/api-colour/#tocolourspace).
|
||||
|
||||
|
||||
**Since**: 0.33.0
|
||||
@@ -430,7 +430,7 @@ Indexed PNG input at 1, 2 or 4 bits per pixel is converted to 8 bits per pixel.
|
||||
Set `palette` to `true` for slower, indexed PNG output.
|
||||
|
||||
For 16 bits per pixel output, convert to `rgb16` via
|
||||
[toColourspace](/api-colour#tocolourspace).
|
||||
[toColourspace](/api-colour/#tocolourspace).
|
||||
|
||||
|
||||
**Throws**:
|
||||
@@ -589,7 +589,7 @@ Use these JP2 options for output image.
|
||||
|
||||
Requires libvips compiled with support for OpenJPEG.
|
||||
The prebuilt binaries do not include this - see
|
||||
[installing a custom libvips](https://sharp.pixelplumbing.com/install#custom-libvips).
|
||||
[installing a custom libvips](/install#custom-libvips).
|
||||
|
||||
|
||||
**Throws**:
|
||||
@@ -754,7 +754,7 @@ This feature is experimental, please do not use in production systems.
|
||||
|
||||
Requires libvips compiled with support for libjxl.
|
||||
The prebuilt binaries do not include this - see
|
||||
[installing a custom libvips](https://sharp.pixelplumbing.com/install#custom-libvips).
|
||||
[installing a custom libvips](/install/#custom-libvips).
|
||||
|
||||
|
||||
**Throws**:
|
||||
|
||||
@@ -114,7 +114,7 @@ e.g. libaom manages its own 4 threads when encoding AVIF images,
|
||||
and these are independent of the value set here.
|
||||
|
||||
:::note
|
||||
Further [control over performance](/performance) is available.
|
||||
Further [control over performance](/performance/) is available.
|
||||
:::
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user