Code Monkey home page Code Monkey logo

dimwit's Introduction

dimwit

Dynamic Image Manipulation Service with Nginx

Features

Uses the HttpImageFilterModule to dynamically process remote images into cropped, rotated and resized derivatives based on remote source images. Derivative images are created only once per unique url and stored locally. Duplicate requests are served directly from disk.

Setup (using Ubuntu)

  1. Launch a server, e.g. Ubuntu Server 12.04.2 LTS

Nothing special except you need ports 22 (to login via ssh) and 8080 to run the service.

# When you log into the server from the terminal run these commands
sudo mkdir /mnt/media/   # Or whatever you want the server root to be
sudo chown ubuntu:ubuntu /mnt/media
chmod 777 /mnt/media

sudo apt-get install nginx-extras-dbg
# if you get an error uncomment the offending lines in this file and try to reinstall nginx again
# sudo vim /etc/apt/sources.list

curl -O https://raw.githubusercontent.com/fredpalmer/dimwit/develop/nginx.conf
sudo mv nginx.conf /etc/nginx/sites-enabled/
sudo /etc/init.d/nginx restart

You should be running now.

Usage

# resize example
http://<dims-host>:8080/resize/100x100/http://2.bp.blogspot.com/_nm9ySucveA8/TEYgGu9DIgI/AAAAAAAAAO4/XI1q38FFlxw/s1600/unicorns2q.jpg

# crop example
http://<dims-host>:8080/crop/200x200/http://4.bp.blogspot.com/_nm9ySucveA8/TEYgGSJi7sI/AAAAAAAAAOw/XK4VjrHPybw/s1600/unicorns-5-magical-animal.jpg

# rotate example
http://<dims-host>:8080/rotate/90/http://3.bp.blogspot.com/_nm9ySucveA8/TEYgGF9iEWI/AAAAAAAAAOo/uC62nczWcEk/s1600/unicorn1.jpg

dimwit's People

Contributors

fredpalmer avatar

Watchers

Cory Powers avatar Eric Thelin avatar James Cloos avatar David McKnight 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.