mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-02-12 11:46:10 +02:00
Update docs and changelog
This commit is contained in:
parent
4bd745f764
commit
b82e4aea21
@ -7,6 +7,7 @@
|
||||
- (pro) [Getting the image info](https://docs.imgproxy.net/#/getting_the_image_info).
|
||||
|
||||
## Changed
|
||||
- Improved `trim` processing option.
|
||||
- Quantizr updated to 0.2.0 in Docker image.
|
||||
|
||||
|
||||
|
@ -173,20 +173,20 @@ Defines an area of the image to be processed (crop before resize).
|
||||
#### Trim
|
||||
|
||||
```
|
||||
trim:%threshold:%hex_color:%equal_hor:%equal_ver
|
||||
t:%threshold:%hex_color:%equal_hor:%equal_ver
|
||||
trim:%threshold:%color:%equal_hor:%equal_ver
|
||||
t:%threshold:%color:%equal_hor:%equal_ver
|
||||
```
|
||||
|
||||
Removes surrounding background.
|
||||
|
||||
* `threshold` - color similarity tolerance (the only required argument).
|
||||
* `hex_color` - hex-coded value of the color that needs to be cut off.
|
||||
* `equal_hor` - cut only equal parts from left and right sides. That means that if 10px of background can be cut off from left and 5px from right then 5px will be cut off from both sides. For example, it can be useful if objects on your images are centered but have non-symmetrical shadow.
|
||||
* `equal_ver` - acts like `equal_hor` but for top/bottom sides.
|
||||
* `threshold` - color similarity tolerance.
|
||||
* `color` - _(optional)_ hex-coded value of the color that needs to be cut off.
|
||||
* `equal_hor` - _(optional)_ set to `1`, `t` or `true`, imgproxy will cut only equal parts from left and right sides. That means that if 10px of background can be cut off from left and 5px from right then 5px will be cut off from both sides. For example, it can be useful if objects on your images are centered but have non-symmetrical shadow.
|
||||
* `equal_ver` - _(optional)_ acts like `equal_hor` but for top/bottom sides.
|
||||
|
||||
**⚠️Warning:** Trimming requires an image to be fully loaded into memory. This disables scale-on-load and significantly increases memory usage and processing time. Use it carefully with large images.
|
||||
|
||||
**📝Note:** If you know background color of your images then setting it explicitly via `hex_color` will also save some resources because libvips won't detect it automatically.
|
||||
**📝Note:** If you know background color of your images then setting it explicitly via `color` will also save some resources because libvips won't detect it automatically.
|
||||
|
||||
**📝Note:** Trimming of animated images is not supported.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user