1.1.3 • Published 8 years ago

electron-capture v1.1.3

Weekly downloads
22
License
-
Repository
github
Last release
8 years ago

electron-capture

An extension for Electron's BrowserWindow, Make it have the ability to capture full page.

npm version

Why I create this repo

I tried a lots of npm packages, but no one can add the feature (full page capture) for my electron-application. So I code this.

Install

npm install electron-capture --save

Usage

require('electron-capture')

mainWindow = new BrowserWindow({
    width: 1366,
    height: 768,
    resizable: true,
    webPreferences: {
        preload: __dirname + '/node_modules/electron-capture/src/preload.js'
    }
})
mainWindow.loadURL('https://www.google.com/')

mainWindow.captureFullPage(function(imageStream){
    // return an image Stream
    imageStream.pipe(fs.createWriteStream('example.png'));
})

Demo

1.1.3

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.1.0

8 years ago