diff --git a/CHANGELOG.md b/CHANGELOG.md index 798321e3..a4e68bbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/docker/Dockerfile b/docker/Dockerfile index 85d28049..34876f02 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -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 " @@ -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 " RUN apt-get update \ diff --git a/docs/generating_the_url.md b/docs/generating_the_url.md index eb011139..eb65b79d 100644 --- a/docs/generating_the_url.md +++ b/docs/generating_the_url.md @@ -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. diff --git a/docs/index.html b/docs/index.html index 028bc0bd..bd3def44 100644 --- a/docs/index.html +++ b/docs/index.html @@ -44,6 +44,12 @@ diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 00000000..6f6a8518 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,9 @@ +[build] + base="docs" + publish="/" + command="" + +[[redirects]] + from = "/*" + to = "/index.html" + status = 200 diff --git a/vips.c b/vips.c index e7843bcb..0a472d4e 100644 --- a/vips.c +++ b/vips.c @@ -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))