1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-02-07 11:36:25 +02:00

Merge branch 'master' into version/3

This commit is contained in:
DarthSim 2021-06-23 16:08:53 +06:00
commit 20d9d82e70
6 changed files with 53 additions and 20 deletions

View File

@ -3,11 +3,11 @@
## [Unreleased]
### Added
- `IMGPROXY_FALLBACK_IMAGE_HTTP_CODE` config.
- [expires](https://docs.imgproxy.net/#/generating_the_url?id=expires) processing option.
- [skip processing](https://docs.imgproxy.net/#/generating_the_url?id=skip-processing) processing option.
- [expires](https://docs.imgproxy.net/generating_the_url?id=expires) processing option.
- [skip processing](https://docs.imgproxy.net/generating_the_url?id=skip-processing) processing option.
- [Datadog](./docs/datadog.md) metrics.
- `force` and `fill-down` resizing types.
- [min-width](https://docs.imgproxy.net/#/generating_the_url?id=min-width) and [min-height](https://docs.imgproxy.net/#/generating_the_url?id=min-height) processing options.
- [min-width](https://docs.imgproxy.net/generating_the_url?id=min-width) and [min-height](https://docs.imgproxy.net/generating_the_url?id=min-height) processing options.
### Removed
- Removed basic URL format, use [advanced one](./docs/generating_the_url.md) instead.
@ -17,6 +17,14 @@
- Removed `crop` resizing type, use [crop](./docs/generating_the_url.md#crop) processing option instead.
- Dropped old libvips (<8.8) support.
## [2.16.4] - 2021-06-16
### Change
- Use magenta (ff00ff) as a transparency key in `trim`.
### Fix
- Fix crashes while processing some SVGs (dockerized version).
- (pro) Fix parsing HEIF/AVIF meta.
## [2.16.3] - 2021-04-05
### Fix
- Fix PNG quantization palette size.
@ -37,11 +45,11 @@
### Added
- AVIF support.
- Azure Blob Storage support.
- `IMGPROXY_STRIP_COLOR_PROFILE` config and [strip_color_profile](https://docs.imgproxy.net/#/generating_the_url?id=strip-color-profile) processing option.
- `IMGPROXY_STRIP_COLOR_PROFILE` config and [strip_color_profile](https://docs.imgproxy.net/generating_the_url?id=strip-color-profile) processing option.
- `IMGPROXY_FORMAT_QUALITY` config.
- `IMGPROXY_AUTO_ROTATE` config and [auto_rotate](https://docs.imgproxy.net/#/generating_the_url?id=auto-rotate) processing option.
- [rotate](https://docs.imgproxy.net/#/generating_the_url?id=rotate) processing option.
- `width` and `height` arguments of the [crop](https://docs.imgproxy.net/#/generating_the_url?id=crop) processing option can be less than `1` that is treated by imgproxy as a relative value (a.k.a. crop by percentage).
- `IMGPROXY_AUTO_ROTATE` config and [auto_rotate](https://docs.imgproxy.net/generating_the_url?id=auto-rotate) processing option.
- [rotate](https://docs.imgproxy.net/generating_the_url?id=rotate) processing option.
- `width` and `height` arguments of the [crop](https://docs.imgproxy.net/generating_the_url?id=crop) processing option can be less than `1` that is treated by imgproxy as a relative value (a.k.a. crop by percentage).
- (pro) Remove Adobe Illustrator garbage from SVGs.
- (pro) Add IPTC tags to the `/info` response.
@ -60,11 +68,11 @@
## [2.15.0] - 2020-09-03
### Added
- Ability to skip processing of some formats. See [Skip processing](https://docs.imgproxy.net/#/configuration?id=skip-processing).
- Ability to skip processing of some formats. See [Skip processing](https://docs.imgproxy.net/configuration?id=skip-processing).
- (pro) PDF support.
- (pro) [video_thumbnail_second](https://docs.imgproxy.net/#/generating_the_url?id=video-thumbnail-second) processing option.
- (pro) [page](https://docs.imgproxy.net/#/generating_the_url?id=page) processing option.
- (pro) [background_alpha](https://docs.imgproxy.net/#/generating_the_url?id=background-alpha) processing option.
- (pro) [video_thumbnail_second](https://docs.imgproxy.net/generating_the_url?id=video-thumbnail-second) processing option.
- (pro) [page](https://docs.imgproxy.net/generating_the_url?id=page) processing option.
- (pro) [background_alpha](https://docs.imgproxy.net/generating_the_url?id=background-alpha) processing option.
- (pro) `IMGPROXY_VIDEO_THUMBNAIL_PROBE_SIZE` and `IMGPROXY_VIDEO_THUMBNAIL_MAX_ANALYZE_DURATION` configs.
### Changed
@ -82,8 +90,8 @@
## [2.14.0] - 2020-07-17
### Added
- `IMGPROXY_PROMETHEUS_NAMESPACE` config.
- [strip_metadata](https://docs.imgproxy.net/#/generating_the_url?id=strip-metadata) processing option.
- (pro) Configurable unsharpening. See [Unsharpening](https://docs.imgproxy.net/#/configuration?id=unsharpening) configs and [unsharpening](https://docs.imgproxy.net/#/generating_the_url?id=unsharpening) processing option.
- [strip_metadata](https://docs.imgproxy.net/generating_the_url?id=strip-metadata) processing option.
- (pro) Configurable unsharpening. See [Unsharpening](https://docs.imgproxy.net/configuration?id=unsharpening) configs and [unsharpening](https://docs.imgproxy.net/generating_the_url?id=unsharpening) processing option.
### Changed
- Better for libvips memory metrics for Prometheus.
@ -105,7 +113,7 @@
## [2.13.0] - 2020-04-22
### Added
- Fallback images.
- [padding](https://docs.imgproxy.net/#/generating_the_url?id=padding) processing option.
- [padding](https://docs.imgproxy.net/generating_the_url?id=padding) processing option.
### Changed
- Optimized memory usage. Especially when dealing with animated images.
@ -117,7 +125,7 @@
### Addded
- `IMGPROXY_PATH_PREFIX` config.
- (pro) Video thumbnails.
- (pro) [Getting the image info](https://docs.imgproxy.net/#/getting_the_image_info).
- (pro) [Getting the image info](https://docs.imgproxy.net/getting_the_image_info).
### Changed
- Improved `trim` processing option.

View File

@ -1,4 +1,4 @@
ARG BASE_IMAGE_VERSION="v1.3.2"
ARG BASE_IMAGE_VERSION="v1.4.0"
FROM darthsim/imgproxy-base:${BASE_IMAGE_VERSION}
LABEL maintainer="Sergey Alexandrovich <darthsim@gmail.com>"
@ -9,7 +9,7 @@ RUN go build -v -o /usr/local/bin/imgproxy
# ==================================================================================================
# Final image
FROM debian:buster-slim
FROM debian:bullseye-slim
LABEL maintainer="Sergey Alexandrovich <darthsim@gmail.com>"
RUN apt-get update \

View File

@ -213,7 +213,9 @@ Removes surrounding background.
**⚠️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 `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 imgproxy won't detect it automatically.
**📝Note:** Use `color` value of `FF00FF` for trimming transparent background as imgproxy uses magenta as a transparency key.
**📝Note:** Trimming of animated images is not supported.

View File

@ -44,6 +44,12 @@
<script src="assets/docsify-edit-link.js"></script>
<script src="assets/docsify-gitter.js"></script>
<script>
if (window.DOCSIFY_ROUTER_MODE === "history") {
var clink = document.createElement("link")
clink.rel = "canonical"
document.getElementsByTagName("head")[0].appendChild(clink)
}
window.$docsify = {
logo: '/assets/logo.svg',
name: 'imgproxy',
@ -51,13 +57,21 @@
loadSidebar: true,
subMaxLevel: 2,
auto2top: true,
routerMode: window.DOCSIFY_ROUTER_MODE || "hash",
search: {
namespace: 'docs-imgproxy',
depth: 6
},
plugins: [
EditOnGithubPlugin.create('https://github.com/imgproxy/imgproxy/blob/master/docs/'),
GitterPlugin.create("imgproxy/imgproxy", "1775d3")
GitterPlugin.create("imgproxy/imgproxy", "1775d3"),
function (hook, vm) {
hook.beforeEach(function () {
if (clink) {
clink.href = "https://docs.imgproxy.net" + vm.route.path
}
});
}
]
}
</script>

9
netlify.toml Normal file
View File

@ -0,0 +1,9 @@
[build]
base="docs"
publish="/"
command=""
[[redirects]]
from = "/*"
to = "/index.html"
status = 200

2
vips.c
View File

@ -425,7 +425,7 @@ vips_trim(VipsImage *in, VipsImage **out, double threshold,
VipsImage *tmp;
if (vips_image_hasalpha(in)) {
if (vips_flatten(in, &tmp, NULL))
if (vips_flatten_go(in, &tmp, 255.0, 0, 255.0))
return 1;
} else {
if (vips_copy(in, &tmp, NULL))