Skip to content

Commit 0ee0078

Browse files
committed
docs: fix / rework some documentation
1 parent 7896cb3 commit 0ee0078

16 files changed

+214
-351
lines changed

docs/storage-image-processing-api/operations.mdx

Lines changed: 68 additions & 88 deletions
Large diffs are not rendered by default.

docs/storage-image-processing-api/output.mdx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ This provides the format of the generated image along with additional (optional)
88

99
This mandatory and dictates which optional output operations can be applied.
1010

11-
This must be one of the following...
11+
The `format` property should be one of `jpeg`, `webp`, `tiff`, `avif` or `png`.
1212

1313
### jpeg
1414

1515
| Key | Type | Optional | Default |
1616
| ----------------- | :-----: | :------: | :-----: |
1717
| progressive | Boolean || n/a |
1818
| compressionLevel | Integer || n/a |
19-
| adaptiveFiltering | Integer || n/a |
19+
| adaptiveFiltering | Boolean || n/a |
2020
| palette | Boolean || n/a |
2121
| quality | Integer || n/a |
2222
| colours | Integer || n/a |
@@ -66,9 +66,9 @@ Force PNG output, otherwise attempt to use input format (optional, default true)
6666
| --------------- | :-----: | :------: | :-------: | :-------: | :-----: |
6767
| quality | Boolean || 1 | 100 | 80 |
6868
| alphaQuality | Integer || 0 | 100 | 100 |
69-
| lossless | Integer || n/a | n/a | n/a |
69+
| lossless | Boolean || n/a | n/a | n/a |
7070
| nearLossless | Boolean || n/a | n/a | n/a |
71-
| smartSubsample | Integer || n/a | n/a | n/a |
71+
| smartSubsample | Boolean || n/a | n/a | n/a |
7272
| reductionEffort | Integer || 0 | 6 | 4 |
7373
| pageHeight | Integer || n/a | n/a | n/a |
7474
| force | Boolean || n/a | n/a | n/a |
@@ -107,19 +107,19 @@ Force WebP output, otherwise attempt to use input format (optional, default true
107107

108108
### tiff
109109

110-
| Key | Type | Optional | Min Value | Max Value | Default |
111-
| ----------- | :-----------------: | :------: | :-------: | :-------: | :-----: |
112-
| quality | Boolean || 1 | 100 | 80 |
113-
| force | Boolean || n/a | n/a | n/a |
114-
| compression | [Enum](compression) || n/a | n/a | n/a |
115-
| predictor | [Enum](predictor) || n/a | n/a | n/a |
116-
| pyramid | Boolean || n/a | n/a | n/a |
117-
| tile | Boolean || n/a | n/a | n/a |
118-
| tileWidth | Integer || n/a | n/a | n/a |
119-
| tileHeight | Integer || n/a | n/a | n/a |
120-
| xres | Integer || n/a | n/a | n/a |
121-
| yres | Integer || n/a | n/a | n/a |
122-
| bitdepth | Integer || n/a | n/a | n/a |
110+
| Key | Type | Optional | Min Value | Max Value | Default |
111+
| ----------- | :------------------------------------------------------------------: | :------: | :-------: | :-------: | :----------: |
112+
| quality | Integer || 1 | 100 | 80 |
113+
| force | Boolean || n/a | n/a | n/a |
114+
| compression | Enum([Compression](/storage-image-processing-api/types/compression)) || n/a | n/a | 'jpeg' |
115+
| predictor | Enum([Predictor](/storage-image-processing-api/types/Predictor)) || n/a | n/a | 'horizontal' |
116+
| pyramid | Boolean || n/a | n/a | n/a |
117+
| tile | Boolean || n/a | n/a | n/a |
118+
| tileWidth | Integer || n/a | n/a | n/a |
119+
| tileHeight | Integer || n/a | n/a | n/a |
120+
| xres | Integer || n/a | n/a | n/a |
121+
| yres | Integer || n/a | n/a | n/a |
122+
| bitdepth | Integer || n/a | n/a | n/a |
123123

124124
#### `quality`
125125

Lines changed: 31 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,33 @@
11
### `Blend`
22

3-
More information about blend modes can be found
4-
5-
at https://libvips.github.io/libvips/API/current/libvips-conversion.html#VipsBlendMode
6-
7-
and https://www.cairographics.org/operators/
8-
9-
**clear**
10-
11-
**source**
12-
13-
**over**
14-
15-
**in**
16-
17-
**out**
18-
19-
**atop**
20-
21-
**dest**
22-
23-
**dest-over**
24-
25-
**dest-in**
26-
27-
**dest-out**
28-
29-
**dest-atop**
30-
31-
**xor**
32-
33-
**add**
34-
35-
**saturate**
36-
37-
**multiply**
38-
39-
**screen**
40-
41-
**overlay**
42-
43-
**darken**
44-
45-
**lighten**
46-
47-
**colour-dodge**
48-
49-
**color-dodge**
50-
51-
**colour-burn**
52-
53-
**color-burn**
54-
55-
**hard-light**
56-
57-
**soft-light**
58-
59-
**difference**
60-
61-
**exclusion**
3+
More information about blend modes can be found at https://libvips.github.io/libvips/API/current/libvips-conversion.html#VipsBlendMode and https://www.cairographics.org/operators/
4+
5+
| Values |
6+
| -------------- |
7+
| `clear` |
8+
| `source` |
9+
| `over` |
10+
| `in` |
11+
| `out` |
12+
| `atop` |
13+
| `dest` |
14+
| `dest-over` |
15+
| `dest-in` |
16+
| `dest-out` |
17+
| `dest-atop` |
18+
| `xor` |
19+
| `add` |
20+
| `saturate` |
21+
| `multiply` |
22+
| `screen` |
23+
| `overlay` |
24+
| `darken` |
25+
| `lighten` |
26+
| `colour-dodge` |
27+
| `color-dodge` |
28+
| `color-burn` |
29+
| `color-light` |
30+
| `hard-light` |
31+
| `soft-light` |
32+
| `difference` |
33+
| `exclusion` |
Lines changed: 16 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,18 @@
11
### `Colorspace`
22

3-
Set the output colorspace. By default output image will
4-
5-
be web-friendly sRGB, with additional channels interpreted
6-
7-
as alpha channels.
8-
9-
#### **Options**
10-
11-
**cmyk**
12-
13-
**labq**
14-
15-
**rgb**
16-
17-
**cmc**
18-
19-
**labs**
20-
21-
**srgb**
22-
23-
**Fourier**
24-
25-
**rgb16**
26-
27-
**grey16**
28-
29-
**matrix**
30-
31-
**scrgb**
32-
33-
**hsv**
3+
Set the output colorspace. By default output image will be web-friendly sRGB, with additional channels interpreted as alpha channels.
4+
5+
| Values |
6+
| --------- |
7+
| `cmyk` |
8+
| `labq` |
9+
| `rgb` |
10+
| `cmc` |
11+
| `labs` |
12+
| `labs` |
13+
| `fourier` |
14+
| `rgb16` |
15+
| `grey16` |
16+
| `matrix` |
17+
| `scrgb` |
18+
| `hsv` |
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
### `Compression`
2+
3+
| Values |
4+
| ----------- |
5+
| `lzw` |
6+
| `deflate` |
7+
| `jpeg` |
8+
| `ccittfax4` |
Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,15 @@
11
### `Gravity`
22

33
Enum of the gravity location.
4-
5-
#### **Options**
6-
7-
**center**
8-
9-
**center**
10-
11-
**north**
12-
13-
**east**
14-
15-
**south**
16-
17-
**west**
18-
19-
**northeast**
20-
21-
**southeast**
22-
23-
**southwest**
24-
25-
**northwest**
4+
| Values |
5+
| --------- |
6+
| `center` |
7+
| `centre` |
8+
| `north` |
9+
| `east` |
10+
| `south` |
11+
| `west` |
12+
| `northeast` |
13+
| `southeast` |
14+
| `southwest` |
15+
| `northwest` |

docs/storage-image-processing-api/types/index.mdx

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,15 @@
22

33
This page contains an assorted list of types and enums that are used throughout the library.
44

5-
### [Gravity](/storage-image-processing-api/types/gravity)
6-
7-
### [Interpolator](/storage-image-processing-api/types/interpolator)
8-
9-
### [Matrix](/storage-image-processing-api/types/matrix)
10-
11-
### [Colorspace](/storage-image-processing-api/types/colorspace)
12-
13-
### [Blend](/storage-image-processing-api/types/blend)
14-
15-
### [Number](/storage-image-processing-api/types/number)
16-
17-
### [OperationResizeFit](/storage-image-processing-api/types/operationResizeFit)
18-
19-
### [OperationResizeKernel](/storage-image-processing-api/types/operationResizeKernel)
20-
21-
### [OperationResizePosition](/storage-image-processing-api/types/operationResizePosition)
22-
23-
### [OperationResizeStrategy](/storage-image-processing-api/types/operationResizeStrategy)
5+
| |
6+
| ---------------------------------------------------------------------------------------- |
7+
| [`Blend`](/storage-image-processing-api/types/blend) |
8+
| [`Colorspace`](/storage-image-processing-api/types/colorspace) |
9+
| [`Compression`](/storage-image-processing-api/types/compression) |
10+
| [`Gravity`](/storage-image-processing-api/types/gravity) |
11+
| [`Interpolator`](/storage-image-processing-api/types/interpolator) |
12+
| [`OperationResizeFit`](/storage-image-processing-api/types/operationResizeFit) |
13+
| [`OperationResizeKernel`](/storage-image-processing-api/types/operationResizeKernel) |
14+
| [`OperationResizeStrategy`](/storage-image-processing-api/types/operationResizeStrategy) |
15+
| [`Predictor`](/storage-image-processing-api/types/predictor) |
16+
| [`TextAlign`](/storage-image-processing-api/types/textAlign) |
Lines changed: 8 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,10 @@
11
### `Interpolator`
22

3-
#### **Options**
4-
5-
**nearest**
6-
7-
[Nearest neighbour interpolation](http://en.wikipedia.org/wiki/Nearest-neighbor_interpolation).
8-
9-
Suitable for image enlargement only
10-
11-
**bilinear**
12-
13-
[Bilinear interpolation](http://en.wikipedia.org/wiki/Bilinear_interpolation).
14-
Faster than bicubic but with less smooth results.
15-
16-
**bicubic**
17-
18-
[Bicubic interpolation](http://en.wikipedia.org/wiki/Bicubic_interpolation)
19-
(the default).
20-
21-
**locallyBoundedBicubic**
22-
23-
[LBB interpolation](https://github.com/jcupitt/libvips/blob/master/libvips/resample/lbb.cpp#L100).
24-
Prevents some "[acutance](http://en.wikipedia.org/wiki/Acutance)" but typically reduces performance
25-
by a factor of 2.
26-
27-
**nohalo**
28-
29-
[Nohalo interpolation](http://eprints.soton.ac.uk/268086/).
30-
Prevents acutance but typically reduces performance by a factor of 3.
31-
32-
**vertexSplitQuadraticBasisSpline**
33-
34-
[Vertex Split Quadratic Basis Spline interpolation](https://github.com/jcupitt/libvips/blob/master/libvips/resample/vsqbs.cpp#L48).
35-
36-
Prevents "staircasing" when enlarging.
3+
| Values | Description |
4+
| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
5+
| `nearest` | [Nearest neighbour interpolation](http://en.wikipedia.org/wiki/Nearest-neighbor_interpolation). Suitable for image enlargement only. |
6+
| `bilinear` | [Bilinear interpolation](http://en.wikipedia.org/wiki/Bilinear_interpolation). Faster than bicubic but with less smooth results. |
7+
| `bicubic` | [Bicubic interpolation](http://en.wikipedia.org/wiki/Bicubic_interpolation). Default. |
8+
| `locallyBoundedBicubic` | [LBB interpolation](https://github.com/jcupitt/libvips/blob/master/libvips/resample/lbb.cpp#L100).Prevents some "[acutance](http://en.wikipedia.org/wiki/Acutance)" but typically reduces performance by a factor of 2. |
9+
| `nohalo` | [Nohalo interpolation](http://eprints.soton.ac.uk/268086/). Prevents acutance but typically reduces performance by a factor of 3. |
10+
| `vertexSplitQuadraticBasisSpline` | [Vertex Split Quadratic Basis Spline interpolation](https://github.com/jcupitt/libvips/blob/master/libvips/resample/vsqbs.cpp#L48). |

docs/storage-image-processing-api/types/matrix.mdx

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/storage-image-processing-api/types/number.mdx

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)