poetic:get-image-lightness

v0.0.1Published 10 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

get-image-lightness

get-image-lightness exposes a function that returns the lightness of an image. This package processes a copy of the passed in image, so make sure that your image hosting provider is configured to allow cross-origin anonymous retrieval.

Installation

meteor add poetic:get-image-lightness

Usage

Local File:

get-image-lightness('images/example.jpg', function(brightness){
  console.log(brightness)
});

URL:

get-image-lightness('www.exampleimage.com/example', function(brightness){
  console.log(brightness)
});