Skip to content

nbqx/node-screeen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Screeen (OSX ONLY)

utility for osx screenshot img

Install

$ npm install screeen

Usage

option:

  • type('png','jpg','tiff','pdf') - default jpg
  • data('path' or 'binary') - default path
  • mode('interactive','screen','window') - default interactive
  • rect(x,y,w,h as array) - default not set

ignore opt.mode option if option.rect is set

Example

// with callback
Screeen.capture({type:'jpg',data:'binary'}, function(err,data){
  // data is BINARY data
  if(err) return console.log(err);
  fs.writeFileSync('test.jpg', data, {encoding:'binary'});
});

// without callback
var w = fs.createWriteStream('test2.jpg');
Screeen.capture({rect:[0,0,100,100]}).on('captured',function(path){
  // path is TEMPORARY FILE PATH
  fs.createReadStream(path).pipe(w);
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published