Giter VIP home page Giter VIP logo

image-proxy-server's Introduction

Image Proxy Server

Image proxy server will take an image and resize it to two specific sizes: 160x237 and 320x474.

Usage

URL should have the size and the URL that you want to resize. For example:

/image/160x237/http%3A%2F%2Fallon.it%2Fwp-content%2Fuploads%2F2015%2F02%2Fgatt.jpg

Example for SC:

http://domain.com/sc/375x175/https%3A%2F%2Fwww.sc.com%2Fsg%2Fassets%2Fpws%2Fimages%2Fbanner%2F1580x350_sme_banking.jpg http://192.168.2.11/sc/375x175/https%3A%2F%2Fwww.sc.com%2Fsg%2Fassets%2Fpws%2Fimages%2Fbanner%2F1580x350_sme_banking.jpg

http://52.76.132.44/sc/375x175/<country>/https%3A%2F%2Fwww.sc.com%2Fsg%2Fassets%2Fpws%2Fimages%2Fbanner%2F1580x350_sme_banking.jpg

Don't forget to URL encode the path to the source image.

Images

The source path:

https://scsearchimages.s3-ap-southeast-1.amazonaws.com/lk/search/images/lk_08_ml_top_banner-375x175.jpg

The SC path:

https://www.sc.com/lk/search/images/lk_08_ml_top_banner-375x175.jpg

Dependancies

This requires GraphicsMagick with the JPG library. For Mac, follow this and download version 9a. Probably the same for *nix.

Refs:

http://ext.raneous.net/post/40106080462/building-graphicsmagick-on-osx

http://stackoverflow.com/questions/20220899/graphicsmagick-no-decode-delegate-for-this-image-format

http://justinbozonier.posthaven.com/creating-an-image-proxy-server-in-nodejs

Notes

Originally used an AMI that's in the US West (N. California) region. AMI ID: ImageProxy (ami-3c85ad79). Source here.

Smart Crop Option

Starting with the intent engine, we needed a way to intelligently crop images from DBpedia. We're using SmartCrop, actually the adapter module for Node.

Need to install ImageMagik.

Turns out it's not so great with athletes, it's focusing on tennis racquets and legs.. :l

image-proxy-server's People

Contributors

ryac avatar

Watchers

Vinay M avatar PebbleRoad  avatar  avatar James Cloos avatar  avatar  avatar  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.