Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
N

node-screenshots

> DevOps
Open source

Zero-dependent. A native nodejs screenshots library for Mac、Windows、Linux.

382 stars0 likes1 views
WebsiteGitHub

About

Zero-dependent. A native nodejs screenshots library for Mac、Windows、Linux.

node-screenshots

node-screenshots is a native node.js screenshot library based on XCap, It supports Mac, Windows, and Linux systems without any dependencies. node-screenshots supports screenshot and video recording (to be implemented).

English | 简体中文

Support Matrix

Operating System

Operating System node16 node18 node20
Windows x64 ✓ ✓ ✓
Windows x32 ✓ ✓ ✓
Windows arm64 ✓ ✓ ✓
macOS x64 ✓ ✓ ✓
macOS arm64 ✓ ✓ ✓
Linux x64 gnu ✓ ✓ ✓
Linux x64 musl ✓ ✓ ✓
Linux arm64 gnu ✓ ✓ ✓
Linux loongarch64 ✓ ✓ ✓

Example

Monitor

…

Window

…

API

Full typeScript type definition: index.d.ts

Monitor

  • static all(): Array: Get all monitor
  • static fromPoint(x: number, y: number): Monitor | null: Get a monitor from the specified coordinates
  • captureImageSync(): Image: Synchronously capture image
  • captureImage(): Promise: Asynchronously capture image

Window

  • static all(): Array: Get all window
  • captureImageSync(): Image: Synchronously capture image
  • captureImage(): Promise: Asynchronously capture image

Image

  • cropSync(x: number, y: number, width: number, height: number): Image: Synchronously crop image
  • crop(x: number, y: number, width: number, height: number): Promise: Asynchronously crop image
  • toPngSync(copyOutputData?: boolean | undefined | null): Buffer:Synchronously Convert to png
  • toPng(copyOutputData?: boolean | undefined | null): Promise: Asynchronously Convert to png
  • toJpegSync(copyOutputData?: boolean | undefined | null): Buffer: Synchronously Convert to jpeg
  • toJpeg(copyOutputData?: boolean | undefined | null): Promise: Asynchronously Convert to jpeg
  • toBmpSync(copyOutputData?: boolean | undefined | null): Buffer: Synchronously Convert to bmp
  • toBmp(copyOutputData?: boolean | undefined | null): Promise: Asynchronously Convert to bmp
  • toRawSync(copyOutputData?: boolean | undefined | null): Buffer: Synchronously Convert to raw(RGBA data)
  • toRaw(copyOutputData?: boolean | undefined | null): Promise: Asynchronously Convert to raw(RGBA data)

copyOutputData: pass related parameters in electron, otherwise electron will crash, nodejs does not pass or passes false, performance will be better, for more information refer to https://github.com/napi-rs/napi-rs/issues/1346

Linux System Requirements

On Linux, you need to install libxcb, libxrandr, and dbus.

Debian / Ubuntu:

bash
apt-get install libxcb1 libxrandr2 libdbus-1-3

Alpine:

bash
apk add libxcb libxrandr dbus

Related Repositories

  • xcap - XCap is a cross-platform screen capture library written in Rust

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustlinuxmacosnativenodejs

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理