Skip to content

Commit

Permalink
updating readme so mpore code blocks will be detected
Browse files Browse the repository at this point in the history
  • Loading branch information
soldair committed May 6, 2011
1 parent 59739ac commit 74f9bdb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Expand Up @@ -11,25 +11,31 @@ PixelCore
pixel core is the core object used to apply transforms on a canvas.

this is a standard object so extend it as you need =)

var PixelCore = require('canvasutil').PixelCore
, pixelProcessor = new PixelCore();

this is the only method defined in the prototype of PixelCore
it accepts a node canvas as arg 1 and a transform callback as arg 2

pixelProcessor.iterate(Canvas,eachPixelCallback);

this is a value that may be used in transform callbacks that have a scaling behavior

pixelProcessor.threshold = 50;

the transforms object is a convience property to hold all available transform methods

pixelProcessor.transforms

this holds all grayscale flavors of transforms

pixelProcessor.transforms.grayscale
//the best grayscale transform is luma so use that one unless you have a specific need
pixelProcessor.transforms.grayscale.luma

and i have some other interesting transforms

//brightens everything below a threshold to threshold
//threshold range is 0-100
pixelProcessor.transforms.brightenThreshold
Expand Down

0 comments on commit 74f9bdb

Please sign in to comment.