Skip to content

Commit 32f2648

Browse files
committed
Fix extend, extend_aspect_ratio, and gravity docs
1 parent 350500a commit 32f2648

9 files changed

Lines changed: 27 additions & 27 deletions

File tree

docs/usage/processing.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ ex:%extend:%gravity
203203
```
204204

205205
* When `extend` is set to `1`, `t` or `true`, imgproxy will extend the image if it is smaller than the given size.
206-
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
206+
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`, `obj`, and `objw`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
207207

208208
Default: `false:ce:0:0`
209209

@@ -216,7 +216,7 @@ exar:%extend:%gravity
216216
```
217217

218218
* When `extend` is set to `1`, `t` or `true`, imgproxy will extend the image to the requested aspect ratio.
219-
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
219+
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`, `obj`, and `objw`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
220220

221221
Default: `false:ce:0:0`
222222

@@ -250,7 +250,7 @@ Default: `ce:0:0`
250250
* `gravity:sm`: smart gravity. `libvips` detects the most "interesting" section of the image and considers it as the center of the resulting image. Offsets are not applicable here.
251251
* `gravity:obj:%class_name1:%class_name2:...:%class_nameN`: ((pro)) object-oriented gravity. imgproxy [detects objects](../features/object_detection.mdx) of provided classes on the image and calculates the resulting image center using their positions. If class names are omited, imgproxy will use all the detected objects. Also, you can use the `all` pseudo-class to use all the detected objects.
252252
* `gravity:objw:%class_name1:%class_weight1:%class_name2:%class_weight2:...:%class_nameN:%class_weightN`: ((pro)) object-oriented gravity with weights. The same as `gravity:obj` but with custom weights for each class. You can use the `all` pseudo-class to set the weight for all the detected objects. For example, `gravity:objw:all:2:face:3` will set the weight of all the detected objects to `2` and the weight of the detected faces to `3`. The default weight is `1`.
253-
* `gravity:fp:%x:%y`: the gravity focus point . `x` and `y` are floating point numbers between 0 and 1 that define the coordinates of the center of the resulting image. Treat 0 and 1 as right/left for `x` and top/bottom for `y`.
253+
* `gravity:fp:%x:%y`: the gravity focus point. `x` and `y` are floating point numbers between 0 and 1 that define the coordinates of the center of the resulting image. Treat 0 and 1 as right/left for `x` and top/bottom for `y`.
254254

255255
### Crop
256256

versioned_docs/version-3.19.x/usage/processing.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ ex:%extend:%gravity
193193
```
194194

195195
* When `extend` is set to `1`, `t` or `true`, imgproxy will extend the image if it is smaller than the given size.
196-
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
196+
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`, `obj`, and `objw`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
197197

198198
Default: `false:ce:0:0`
199199

@@ -206,7 +206,7 @@ exar:%extend:%gravity
206206
```
207207

208208
* When `extend` is set to `1`, `t` or `true`, imgproxy will extend the image to the requested aspect ratio.
209-
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
209+
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`, `obj`, and `objw`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
210210

211211
Default: `false:ce:0:0`
212212

@@ -237,7 +237,7 @@ Default: `ce:0:0`
237237

238238
* `gravity:sm`: smart gravity. `libvips` detects the most "interesting" section of the image and considers it as the center of the resulting image. Offsets are not applicable here.
239239
* `gravity:obj:%class_name1:%class_name2:...:%class_nameN`: ((pro)) object-oriented gravity. imgproxy [detects objects](../features/object_detection.mdx) of provided classes on the image and calculates the resulting image center using their positions. If class names are omited, imgproxy will use all the detected objects.
240-
* `gravity:fp:%x:%y`: the gravity focus point . `x` and `y` are floating point numbers between 0 and 1 that define the coordinates of the center of the resulting image. Treat 0 and 1 as right/left for `x` and top/bottom for `y`.
240+
* `gravity:fp:%x:%y`: the gravity focus point. `x` and `y` are floating point numbers between 0 and 1 that define the coordinates of the center of the resulting image. Treat 0 and 1 as right/left for `x` and top/bottom for `y`.
241241

242242
### Crop
243243

versioned_docs/version-3.20.x/usage/processing.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ ex:%extend:%gravity
193193
```
194194

195195
* When `extend` is set to `1`, `t` or `true`, imgproxy will extend the image if it is smaller than the given size.
196-
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
196+
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`, `obj`, and `objw`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
197197

198198
Default: `false:ce:0:0`
199199

@@ -206,7 +206,7 @@ exar:%extend:%gravity
206206
```
207207

208208
* When `extend` is set to `1`, `t` or `true`, imgproxy will extend the image to the requested aspect ratio.
209-
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
209+
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`, `obj`, and `objw`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
210210

211211
Default: `false:ce:0:0`
212212

@@ -237,7 +237,7 @@ Default: `ce:0:0`
237237

238238
* `gravity:sm`: smart gravity. `libvips` detects the most "interesting" section of the image and considers it as the center of the resulting image. Offsets are not applicable here.
239239
* `gravity:obj:%class_name1:%class_name2:...:%class_nameN`: ((pro)) object-oriented gravity. imgproxy [detects objects](../features/object_detection.mdx) of provided classes on the image and calculates the resulting image center using their positions. If class names are omited, imgproxy will use all the detected objects.
240-
* `gravity:fp:%x:%y`: the gravity focus point . `x` and `y` are floating point numbers between 0 and 1 that define the coordinates of the center of the resulting image. Treat 0 and 1 as right/left for `x` and top/bottom for `y`.
240+
* `gravity:fp:%x:%y`: the gravity focus point. `x` and `y` are floating point numbers between 0 and 1 that define the coordinates of the center of the resulting image. Treat 0 and 1 as right/left for `x` and top/bottom for `y`.
241241

242242
### Crop
243243

versioned_docs/version-3.21.x/usage/processing.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ ex:%extend:%gravity
193193
```
194194

195195
* When `extend` is set to `1`, `t` or `true`, imgproxy will extend the image if it is smaller than the given size.
196-
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
196+
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`, `obj`, and `objw`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
197197

198198
Default: `false:ce:0:0`
199199

@@ -206,7 +206,7 @@ exar:%extend:%gravity
206206
```
207207

208208
* When `extend` is set to `1`, `t` or `true`, imgproxy will extend the image to the requested aspect ratio.
209-
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
209+
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`, `obj`, and `objw`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
210210

211211
Default: `false:ce:0:0`
212212

@@ -237,7 +237,7 @@ Default: `ce:0:0`
237237

238238
* `gravity:sm`: smart gravity. `libvips` detects the most "interesting" section of the image and considers it as the center of the resulting image. Offsets are not applicable here.
239239
* `gravity:obj:%class_name1:%class_name2:...:%class_nameN`: ((pro)) object-oriented gravity. imgproxy [detects objects](../features/object_detection.mdx) of provided classes on the image and calculates the resulting image center using their positions. If class names are omited, imgproxy will use all the detected objects.
240-
* `gravity:fp:%x:%y`: the gravity focus point . `x` and `y` are floating point numbers between 0 and 1 that define the coordinates of the center of the resulting image. Treat 0 and 1 as right/left for `x` and top/bottom for `y`.
240+
* `gravity:fp:%x:%y`: the gravity focus point. `x` and `y` are floating point numbers between 0 and 1 that define the coordinates of the center of the resulting image. Treat 0 and 1 as right/left for `x` and top/bottom for `y`.
241241

242242
### Crop
243243

versioned_docs/version-3.22.x/usage/processing.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ ex:%extend:%gravity
193193
```
194194

195195
* When `extend` is set to `1`, `t` or `true`, imgproxy will extend the image if it is smaller than the given size.
196-
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
196+
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`, `obj`, and `objw`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
197197

198198
Default: `false:ce:0:0`
199199

@@ -206,7 +206,7 @@ exar:%extend:%gravity
206206
```
207207

208208
* When `extend` is set to `1`, `t` or `true`, imgproxy will extend the image to the requested aspect ratio.
209-
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
209+
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`, `obj`, and `objw`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
210210

211211
Default: `false:ce:0:0`
212212

@@ -239,7 +239,7 @@ Default: `ce:0:0`
239239

240240
* `gravity:sm`: smart gravity. `libvips` detects the most "interesting" section of the image and considers it as the center of the resulting image. Offsets are not applicable here.
241241
* `gravity:obj:%class_name1:%class_name2:...:%class_nameN`: ((pro)) object-oriented gravity. imgproxy [detects objects](../features/object_detection.mdx) of provided classes on the image and calculates the resulting image center using their positions. If class names are omited, imgproxy will use all the detected objects.
242-
* `gravity:fp:%x:%y`: the gravity focus point . `x` and `y` are floating point numbers between 0 and 1 that define the coordinates of the center of the resulting image. Treat 0 and 1 as right/left for `x` and top/bottom for `y`.
242+
* `gravity:fp:%x:%y`: the gravity focus point. `x` and `y` are floating point numbers between 0 and 1 that define the coordinates of the center of the resulting image. Treat 0 and 1 as right/left for `x` and top/bottom for `y`.
243243

244244
### Crop
245245

versioned_docs/version-3.23.x/usage/processing.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ ex:%extend:%gravity
193193
```
194194

195195
* When `extend` is set to `1`, `t` or `true`, imgproxy will extend the image if it is smaller than the given size.
196-
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
196+
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`, `obj`, and `objw`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
197197

198198
Default: `false:ce:0:0`
199199

@@ -206,7 +206,7 @@ exar:%extend:%gravity
206206
```
207207

208208
* When `extend` is set to `1`, `t` or `true`, imgproxy will extend the image to the requested aspect ratio.
209-
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
209+
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`, `obj`, and `objw`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
210210

211211
Default: `false:ce:0:0`
212212

@@ -239,7 +239,7 @@ Default: `ce:0:0`
239239

240240
* `gravity:sm`: smart gravity. `libvips` detects the most "interesting" section of the image and considers it as the center of the resulting image. Offsets are not applicable here.
241241
* `gravity:obj:%class_name1:%class_name2:...:%class_nameN`: ((pro)) object-oriented gravity. imgproxy [detects objects](../features/object_detection.mdx) of provided classes on the image and calculates the resulting image center using their positions. If class names are omited, imgproxy will use all the detected objects.
242-
* `gravity:fp:%x:%y`: the gravity focus point . `x` and `y` are floating point numbers between 0 and 1 that define the coordinates of the center of the resulting image. Treat 0 and 1 as right/left for `x` and top/bottom for `y`.
242+
* `gravity:fp:%x:%y`: the gravity focus point. `x` and `y` are floating point numbers between 0 and 1 that define the coordinates of the center of the resulting image. Treat 0 and 1 as right/left for `x` and top/bottom for `y`.
243243

244244
### Crop
245245

versioned_docs/version-3.24.x/usage/processing.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ ex:%extend:%gravity
193193
```
194194

195195
* When `extend` is set to `1`, `t` or `true`, imgproxy will extend the image if it is smaller than the given size.
196-
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
196+
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`, `obj`, and `objw`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
197197

198198
Default: `false:ce:0:0`
199199

@@ -206,7 +206,7 @@ exar:%extend:%gravity
206206
```
207207

208208
* When `extend` is set to `1`, `t` or `true`, imgproxy will extend the image to the requested aspect ratio.
209-
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
209+
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`, `obj`, and `objw`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
210210

211211
Default: `false:ce:0:0`
212212

@@ -239,7 +239,7 @@ Default: `ce:0:0`
239239

240240
* `gravity:sm`: smart gravity. `libvips` detects the most "interesting" section of the image and considers it as the center of the resulting image. Offsets are not applicable here.
241241
* `gravity:obj:%class_name1:%class_name2:...:%class_nameN`: ((pro)) object-oriented gravity. imgproxy [detects objects](../features/object_detection.mdx) of provided classes on the image and calculates the resulting image center using their positions. If class names are omited, imgproxy will use all the detected objects.
242-
* `gravity:fp:%x:%y`: the gravity focus point . `x` and `y` are floating point numbers between 0 and 1 that define the coordinates of the center of the resulting image. Treat 0 and 1 as right/left for `x` and top/bottom for `y`.
242+
* `gravity:fp:%x:%y`: the gravity focus point. `x` and `y` are floating point numbers between 0 and 1 that define the coordinates of the center of the resulting image. Treat 0 and 1 as right/left for `x` and top/bottom for `y`.
243243

244244
### Crop
245245

versioned_docs/version-3.25.x/usage/processing.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ ex:%extend:%gravity
203203
```
204204

205205
* When `extend` is set to `1`, `t` or `true`, imgproxy will extend the image if it is smaller than the given size.
206-
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
206+
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`, `obj`, and `objw`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
207207

208208
Default: `false:ce:0:0`
209209

@@ -216,7 +216,7 @@ exar:%extend:%gravity
216216
```
217217

218218
* When `extend` is set to `1`, `t` or `true`, imgproxy will extend the image to the requested aspect ratio.
219-
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
219+
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`, `obj`, and `objw`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
220220

221221
Default: `false:ce:0:0`
222222

@@ -249,7 +249,7 @@ Default: `ce:0:0`
249249

250250
* `gravity:sm`: smart gravity. `libvips` detects the most "interesting" section of the image and considers it as the center of the resulting image. Offsets are not applicable here.
251251
* `gravity:obj:%class_name1:%class_name2:...:%class_nameN`: ((pro)) object-oriented gravity. imgproxy [detects objects](../features/object_detection.mdx) of provided classes on the image and calculates the resulting image center using their positions. If class names are omited, imgproxy will use all the detected objects.
252-
* `gravity:fp:%x:%y`: the gravity focus point . `x` and `y` are floating point numbers between 0 and 1 that define the coordinates of the center of the resulting image. Treat 0 and 1 as right/left for `x` and top/bottom for `y`.
252+
* `gravity:fp:%x:%y`: the gravity focus point. `x` and `y` are floating point numbers between 0 and 1 that define the coordinates of the center of the resulting image. Treat 0 and 1 as right/left for `x` and top/bottom for `y`.
253253

254254
### Crop
255255

versioned_docs/version-3.26.x/usage/processing.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ ex:%extend:%gravity
203203
```
204204

205205
* When `extend` is set to `1`, `t` or `true`, imgproxy will extend the image if it is smaller than the given size.
206-
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
206+
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`, `obj`, and `objw`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
207207

208208
Default: `false:ce:0:0`
209209

@@ -216,7 +216,7 @@ exar:%extend:%gravity
216216
```
217217

218218
* When `extend` is set to `1`, `t` or `true`, imgproxy will extend the image to the requested aspect ratio.
219-
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
219+
* `gravity` _(optional)_ accepts the same values as the [gravity](#gravity) option, except `sm`, `obj`, and `objw`. When `gravity` is not set, imgproxy will use `ce` gravity without offsets.
220220

221221
Default: `false:ce:0:0`
222222

@@ -250,7 +250,7 @@ Default: `ce:0:0`
250250
* `gravity:sm`: smart gravity. `libvips` detects the most "interesting" section of the image and considers it as the center of the resulting image. Offsets are not applicable here.
251251
* `gravity:obj:%class_name1:%class_name2:...:%class_nameN`: ((pro)) object-oriented gravity. imgproxy [detects objects](../features/object_detection.mdx) of provided classes on the image and calculates the resulting image center using their positions. If class names are omited, imgproxy will use all the detected objects. Also, you can use the `all` pseudo-class to use all the detected objects.
252252
* `gravity:objw:%class_name1:%class_weight1:%class_name2:%class_weight2:...:%class_nameN:%class_weightN`: ((pro)) object-oriented gravity with weights. The same as `gravity:obj` but with custom weights for each class. You can use the `all` pseudo-class to set the weight for all the detected objects. For example, `gravity:objw:all:2:face:3` will set the weight of all the detected objects to `2` and the weight of the detected faces to `3`. The default weight is `1`.
253-
* `gravity:fp:%x:%y`: the gravity focus point . `x` and `y` are floating point numbers between 0 and 1 that define the coordinates of the center of the resulting image. Treat 0 and 1 as right/left for `x` and top/bottom for `y`.
253+
* `gravity:fp:%x:%y`: the gravity focus point. `x` and `y` are floating point numbers between 0 and 1 that define the coordinates of the center of the resulting image. Treat 0 and 1 as right/left for `x` and top/bottom for `y`.
254254

255255
### Crop
256256

0 commit comments

Comments
 (0)