GithubHelp home page GithubHelp logo

img-server's Introduction

Circus Image Server


Requirements s3 bucket static hosting cloudfront dist

Process Flow

  1. request to cdn, returns if exists else
  2. returns request from object store, if it does not exists, object store temp redirects 307 if matching 404 and key prefix to:
  3. serverless function: serverless function processes image changes temp redirecting 307 to new resource using object store api uri

Original

https://images.circusliving.com/lizmcgrath1.jpg

Formats

convert to: jpg,jpeg,webp,png,tiff

inputs: jpeg, png, webp, gif, svg

https://images.circusliving.com/lizmcgrath1.jpeg

https://images.circusliving.com/lizmcgrath1.webp

https://images.circusliving.com/lizmcgrath1.png

https://images.circusliving.com/lizmcgrath1.tiff

Compression

convert to: jpg,jpeg,webp,png,tiff with a 10% to 90% compression.

https://images.circusliving.com/lizmcgrath1.min.jpg default: 80%

https://images.circusliving.com/lizmcgrath1.min1.jpg default: 10%

https://images.circusliving.com/lizmcgrath1.min9.jpg default: 90%

resize:

https://images.circusliving.com/100x100/lizmcgrath1.jpg

keeps aspect ratio and uses 80% compression

crop:

https://images.circusliving.com/c:southwest/lizmcgrath1.jpg

Smart crop options:

north, northeast, east, southeast, south, southwest, west, northwest, center

or

entropy: focus on the region with the highest Shannon entropy.https://en.wikipedia.org/wiki/Entropy_%28information_theory%29

or

attention: focus on the region with the highest luminance frequency, colour saturation and presence of skin tones.

tint:

https://images.circusliving.com/t:255,0,0/lizmcgrath1.jpg

Tints the image with an RGB value.

black & white ... greyscale

https://images.circusliving.com/greyscale/lizmcgrath1.jpg

flip

https://images.circusliving.com/flip/lizmcgrath1.jpg

flop

https://images.circusliving.com/flop/lizmcgrath1.jpg

rotate

https://images.circusliving.com/r:90/lizmcgrath1.jpg

Rotate 90,180,270 degrees

extract (crop with dementions)

https://images.circusliving.com/e:100,100,300,100/lizmcgrath1.jpg

Extract has 4 parameters left, top, width, height

todo: svg optimize animated gif optimize automate cloudfront dist creation automate bucket /key/prefix creation azure version google cloud version

img-server's People

Contributors

randyhoulahan avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.