diff --git a/docs/assets/pro.svg b/docs/assets/pro.svg new file mode 100644 index 00000000..a154ecf7 --- /dev/null +++ b/docs/assets/pro.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/docs/assets/style.css b/docs/assets/style.css index 68e907ed..87a38ead 100644 --- a/docs/assets/style.css +++ b/docs/assets/style.css @@ -73,3 +73,8 @@ transform: rotate(360deg); } } + +.pro-badge { + height: 1em; + vertical-align: middle; +} diff --git a/docs/configuration.md b/docs/configuration.md index 4ab18d15..03254365 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -70,8 +70,30 @@ Also you may want imgproxy to respond with the same error message that it writes ## Compression * `IMGPROXY_QUALITY`: default quality of the resulting image, percentage. Default: `80`; -* `IMGPROXY_GZIP_COMPRESSION`: GZip compression level. Default: `5`; -* `IMGPROXY_JPEG_PROGRESSIVE` : when true, enables progressive JPEG compression. Default: false; +* `IMGPROXY_GZIP_COMPRESSION`: GZip compression level. Default: `5`. + +### Advanced JPEG compression + +* `IMGPROXY_JPEG_PROGRESSIVE`: when true, enables progressive JPEG compression. Default: false; +* `IMGPROXY_JPEG_NO_SUBSAMPLE`: pro when true, chrominance subsampling is disabled. This will improve quality at the cost of larger file size. Default: false; +* `IMGPROXY_JPEG_TRELLIS_QUANT`: pro when true, enables trellis quantisation for each 8x8 block. Reduces file size but increases compression time. Default: false; +* `IMGPROXY_JPEG_OVERSHOOT_DERINGING`: pro when true, enables overshooting of samples with extreme values. Overshooting may reduce ringing artifacts from compression, in particular in areas where black text appears on a white background. Default: false; +* `IMGPROXY_JPEG_OPTIMIZE_SCANS`: pro when true, split the spectrum of DCT coefficients into separate scans. Reduces file size but increases compression time. Requires `IMGPROXY_JPEG_PROGRESSIVE` to be true. Default: false; +* `IMGPROXY_JPEG_QUANT_TABLE`: pro quantization table to use. Supported values are: + * `0`: Table from JPEG Annex K (default); + * `1`: Flat table; + * `2`: Table tuned for MSSIM on Kodak image set; + * `3`: Table from ImageMagick by N. Robidoux; + * `4`: Table tuned for PSNR-HVS-M on Kodak image set; + * `5`: Table from Relevance of Human Vision to JPEG-DCT Compression (1992); + * `6`: Table from DCTune Perceptual Optimization of Compressed Dental X-Rays (1997); + * `7`: Table from A Visual Detection Model for DCT Coefficient Quantization (1993); + * `8`: Table from An Improved Detection Model for DCT Coefficient Quantization (1993). + +**Note:** `IMGPROXY_JPEG_TRELLIS_QUANT`, `IMGPROXY_JPEG_OVERSHOOT_DERINGING`, `IMGPROXY_JPEG_OPTIMIZE_SCANS`, and `IMGPROXY_JPEG_QUANT_TABLE` require libvips to be built with [MozJPEG](https://github.com/mozilla/mozjpeg) since standard libjpeg ddoesn't support those optimizations. + +### Advanced PNG compression + * `IMGPROXY_PNG_INTERLACED`: when true, enables interlaced PNG compression. Default: false; * `IMGPROXY_PNG_QUANTIZE`: when true, enables PNG quantization. libvips should be built with libimagequant support. Default: false; * `IMGPROXY_PNG_QUANTIZATION_COLORS`: maximum number of quantization palette entries. Should be between 2 and 256. Default: 256; @@ -100,7 +122,8 @@ imgproxy can use the `Width`, `Viewport-Width` or `DPR` HTTP headers to determin * `IMGPROXY_WATERMARK_DATA`: Base64-encoded image data. You can easily calculate it with `base64 tmp/watermark.png | tr -d '\n'`; * `IMGPROXY_WATERMARK_PATH`: path to the locally stored image; * `IMGPROXY_WATERMARK_URL`: watermark image URL; -* `IMGPROXY_WATERMARK_OPACITY`: watermark base opacity. +* `IMGPROXY_WATERMARK_OPACITY`: watermark base opacity; +* `IMGPROXY_WATERMARKS_CACHE_SIZE`: pro size of custom watermarks cache. When set to `0`, watermarks cache is disabled. By default 256 watermarks are cached. Read more about watermarks in the [Watermark](watermark.md) guide. @@ -224,3 +247,4 @@ imgproxy can send logs to syslog, but this feature is disabled by default. To en * `IMGPROXY_BASE_URL`: base URL prefix that will be added to every requested image URL. For example, if the base URL is `http://example.com/images` and `/path/to/image.png` is requested, imgproxy will download the source image from `http://example.com/images/path/to/image.png`. Default: blank. * `IMGPROXY_USE_LINEAR_COLORSPACE`: when `true`, imgproxy will process images in linear colorspace. This will slow down processing. Note that images won't be fully processed in linear colorspace while shrink-on-load is enabled (see below). * `IMGPROXY_DISABLE_SHRINK_ON_LOAD`: when `true`, disables shrink-on-load for JPEG and WebP. Allows to process the whole image in linear colorspace but dramatically slows down resizing and increases memory usage when working with large images. +* `IMGPROXY_APPLY_UNSHARPEN_MASKING`: pro when `true`, imgproxy will apply unsharpen masking to the resulting image if one is smaller than the source. Default: `true`. diff --git a/docs/generating_the_url_advanced.md b/docs/generating_the_url_advanced.md index bf7eb58a..8544d696 100644 --- a/docs/generating_the_url_advanced.md +++ b/docs/generating_the_url_advanced.md @@ -209,6 +209,17 @@ As an approximate guideline, use 0.5 sigma for 4 pixels/mm (display resolution), Default: disabled +#### Pixelate pro + +``` +pixelate:%size +pix:%size +``` + +When set, imgproxy will apply the pixelate filter to the resulting image. `size` is the size of a pixel. + +Default: disabled + #### Watermark ``` @@ -235,6 +246,28 @@ Puts watermark on the processed image. Default: disabled +#### Watermark URL pro + +``` +watermark_url:%url +wmu:%url +``` + +When set, imgproxy will use the image from the specified URL as a watermark. `url` is Base64-encoded URL of the custom watermark. + +Default: blank + +#### Style pro + +``` +style:%style +st:%style +``` + +When set, imgproxy will prepend `