Git Product home page Git Product logo

nodesizer's Introduction

WORK IN PROGRESS

NodeSizer

Caching ImageResizingProxy service running in node js.

Server designed to provide a nice way of requesting images on the internet at a size you want. Designed and built in Node JS. It's none blocking, so rolled on out on a CDN/Cloud will scale uniformly.

Currently supports

bold denotes required.

  • source= the source file anywhere on the internet. (WebAddress)
  • size= single or widthxheight e.g. '240' (finds the largest side) '240x360' will do it exact.
  • ext= png,jpg,gif,tiff
  • quality= 1-100 defaults to 80 only works on jpeg, does a default 7 pass png optimisation.

An example request looks like http://localhost:8080/convert?size=240&source=http://yoursite.com/media/yourimage.png

Headers

  • 1.0.1 - Content-Creation-Time : [elapsed] (Returns how long it took to create/return the image for you)

Nodejitsu

Version running on nodejitsu:

http://nodesizer.jit.su/convert?size=...&source=...

Please test and let me know if you find any issues.

Coming soon

  • Override file caching
  • Image Caching length
  • Content expirey headers.
  • iPad scaling

Versions

  • 1.3.3
    Fixed issue with not none utf8 orginal images
  • 1.3.2
    Fixed crash on sending headers twice in 404 failure.
  • 1.3.1
    Minor change will clear image/ path on start up.
  • 1.3.0
    • Massive improvement in caching performance! Larger files 300ms to 1ms when cached!
    • Bug fixes.
  • 1.2.2
    Floors image sizes to 10 pixel buckets size=237 floors to 230px.
  • 1.2.1
    Fixed bug with requesting 0 pixel images. Will now return 400, invalid request.
  • 1.2.0
    Added png optipng when converting png's will try and optimise png's.
  • 1.1.0
    Added ext= and quality= params. Takes valid image format (png,gif,jpg) and quality between 1 - 100 for jpeg.
    If you do not specify an extention will convert to .png because png's are not compressed by ISP's over networks.
  • 1.0.0
    Basic server caches orginal and created images and will use them downloaded/created

Licence

Copyright 2012 Christopher Jenkins

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

nodesizer's People

Contributors

chrisjenx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.