Wondering what’s next for npm?Check out our public roadmap! »

electron-region-screenshot

2.0.1 • Public • Published

electron-region-screenshot

region screenshot for electron.

usage

npm install electron-region-screenshot

in mainProcess.js

import { initMain } from 'electron-region-screenshot';

app.on('ready', () => {
  const win = new BrowserWindow();
  initMain(win.webContents);
})

in renderProcess.js

import { screenshot } from 'electron-region-screenshot';
screenshot().then(({ base64 } => {
  console.log(base64);
});

notice

when use in Windows. add the snippet in package.json

...
 "build"{
    ...
    "asarUnpack": [
      "*.exe"
    ],
    ...
 }
...

Install

npm i electron-region-screenshot

DownloadsWeekly Downloads

15

Version

2.0.1

License

MIT

Unpacked Size

376 kB

Total Files

36

Last publish

Collaborators

  • avatar