Skip to content
/ gridjs Public
forked from gridjs/gridjs

JavaScript imaging library for web programming

License

Notifications You must be signed in to change notification settings

ruziniu/gridjs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GridJS

GridJS is a JavaScript imaging library for web programming.

HOW TO USE

Add GridJS to your page

<script src="gridjs.js"></script>

Then open an image from URL

gridjs.open(url, function(im) {
  ...
});

You may process im with methods in API Docs. For example, convert im to grayscale

im.grayscale();

or resize im to new size

im.resize(100, 100);

or resize im then covert to grayscale

im.resize(100, 100).grayscale();

If you'd like to show im, create a canvas element

var canvas = document.create('canvas');
document.getElementsByTagName('body')[0].appendChild(canvas);

then call show method

im.show(canvas);

or just

im.resize(100, 100).grayscale().show(canvas);

Most methods modify origin data(except blank, grayBlank, copy and load), so you may write code like this

im.resize(100, 100);
im.grayscale();
im.show(canvas);

LICENSE

Code licensed under the The MIT License. Documentation licensed under CC BY 3.0.

About

JavaScript imaging library for web programming

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 98.6%
  • HTML 1.4%