All Projects → ultimate-guitar → reImage

ultimate-guitar / reImage

Licence: MIT license
Fast image resizing backend based on libvips, mozjpeg and pngquant

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to reImage

rszr
Fast image resizer for Ruby
Stars: ✭ 21 (-80.37%)
Mutual labels:  image-resizer, image-resizing
seam-carving
An implementation of the seam carving algorithm, designed to resize images while preventing distortion.
Stars: ✭ 30 (-71.96%)
Mutual labels:  image-resizer, image-resizing
Fast-Image-Resizer
Javafx application to resize images and add them into folders automatically.
Stars: ✭ 27 (-74.77%)
Mutual labels:  image-resizer
ImageResizer.Plugins.EPiServerBlobReader
EPiServer Blob provider for ImageResizer.Net
Stars: ✭ 14 (-86.92%)
Mutual labels:  image-resizer
tensorflow-bicubic-downsample
tf.image.resize_images has aliasing when downsampling and does not have gradients for bicubic mode. This implementation fixes those problems.
Stars: ✭ 23 (-78.5%)
Mutual labels:  image-resizing
seam-carving
A fast Python implementation of Seam Carving for Content-Aware Image Resizing.
Stars: ✭ 182 (+70.09%)
Mutual labels:  image-resizing
Lilliput
Resize images and animated GIFs in Go
Stars: ✭ 1,690 (+1479.44%)
Mutual labels:  image-resizer
Thumbnailator
Thumbnailator - a thumbnail generation library for Java
Stars: ✭ 3,845 (+3493.46%)
Mutual labels:  image-resizer
oc-imageresize-plugin
October Plugin - Image Resize
Stars: ✭ 13 (-87.85%)
Mutual labels:  image-resizer
oc-imageresizer-plugin
October CMS Plugin to resize and compress images
Stars: ✭ 44 (-58.88%)
Mutual labels:  image-resizer
imgwizard
Simple server for On-the-Fly image processing in Go
Stars: ✭ 51 (-52.34%)
Mutual labels:  image-resizer
Bicubic-interpolation
Bicubic interpolation for images (Python)
Stars: ✭ 88 (-17.76%)
Mutual labels:  image-resizing
docker-imgproxy
🌐 An ultra fast, production-grade on-the-fly image processing web server. Designed for high throughput with Nginx caching. Powered by imgproxy.
Stars: ✭ 45 (-57.94%)
Mutual labels:  image-resizing

reImage

Features

  1. No os.exec call of pngquant or mozjpeg. Only bindings to libraries.
  2. Using libvips for fast image resizing
  3. Docker container uses libvips compiled with mozjpeg instead of libjpeg-turbo. MozJPEG makes tradeoffs that are intended to benefit Web use cases and focuses solely on improving encoding, so it's best used as part of a Web encoding workflow.
  4. png images are optimized with libimagequant (backend library of pngquant)

Install steps

  1. Deploy it with Docker
  2. Configure frontend
  3. Enjoy!

Deploy

  1. Pull docker container: docker pull larrabee/reimage:1.2.5
  2. Run it with docker run -d -p 7075:7075 larrabee/reimage:1.2.5 or use docker-compose config:
version: '2.2'
services:
  reImage:
    image: larrabee/reimage:1.2.5
    restart: always
    ports:
      - "7075:7075"  

Configure frontend

This is basic Nginx config for online resizing with nginx cache.

http {
    proxy_cache_path /var/www/resize_cache levels=1:2 
    keys_zone=resized_img:64m inactive=48h max_size=5G use_temp_path=off;

    server {
        listen       80;
        server_name  example.com;
        root /var/www/example.com/;

        location /img/ {
           location ~* \.(jpg|jpeg|png|ico)(\@[0-9xX]+)$ {
             proxy_pass http://localhost:7075; #Node with running image resizer
             proxy_set_header X-RESIZE-SCHEME "http";
             proxy_set_header X-RESIZE-BASE "example.com";
             #Nginx cache. Optional
             proxy_cache_valid  200 48h;
             proxy_cache_valid  404 400 5m;
             proxy_cache_valid 500 502 503 504 10s;
             add_header X-Cache-Status $upstream_cache_status;
             proxy_cache resized_img;
           }
        }
    }
}

Required options:

  1. Replace localhost:7075 with your hostname and port if you ran resizer in different node.
  2. Set X-RESIZE-SCHEME "http" if your image server with original images run over http (by default use https).
  3. Set you image server hostname here: X-RESIZE-BASE "example.com"

Optional:

  1. Set X-RESIZE-QUALITY header if you want to override quality settings. Default value: 80, allowed values: 1-100
  2. Set X-RESIZE-COMPRESSION header if you want to override compression settings. Default value: 6, allowed values: 0-9

Enjoy!

Benchmark

See benchmark Wiki page

LICENSE

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].