rectshot

1.0.0 • Public • Published

rectshot

A small nodejs utility to get the color of a pixel on the desktop screen.

Usage

npm i rectshot

import rectshot from rectshot;
 
// synchronous usage - this gets the screen image to buffer at coordinate 100, 200 for a width of 200x200
const color = rectshot([100, 200, 200, 200], true);
 
// async usage - this gets the screen image to buffer at coordinate 100, 200 for a width of 200x200
pixcolor([100, 200, 200, 200], (err, buffer) => {
 
});

The return value will be a Buffer, containing the image data for the region.

Restrictions

This uses edge-js, so it only runs on windows, and from a node environment - it will not work in the browser.

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i rectshot

    Weekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    3.48 kB

    Total Files

    5

    Last publish

    Collaborators

    • seiyria