screenshot-native

1.0.4 • Public • Published

screenshot-native

Screenshots for NodeJS, blazingly fast and easy to use

Installing

yarn add sceenshot-native
or
npm i screenshot-native

Usage

import { screenshot, getRegion, screenSize, encode, toURL } from 'screenshot-native'
or
const { screenshot, getRegion, screenSize, encode, toURL } = require('screenshot-native')

Get a region of the screen

let image = getRegion(0,0,100,100) //Will return raw screenshot data
let encoded = encode(image,'png')
let base64 = toURL(encoded); // you can use this in browser
fs.writeFileSync('test.png',encoded) //or write to local file

Get full screenshot

let image = screenshot() //Will return raw screenshot data
let encoded = encode(image,'png')
let base64 = toURL(encoded); // you can use this in browser
fs.writeFileSync('test.png',encoded) //or write to local file

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.41latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.41
1.0.31
1.0.21
1.0.11
1.0.01

Package Sidebar

Install

npm i screenshot-native

Weekly Downloads

0

Version

1.0.4

License

ISC

Unpacked Size

15.5 kB

Total Files

6

Last publish

Collaborators

  • dimulcu