Extension Icon

Windows Screenshot

Capture full screen, selected region, or active window on Windows.
Overview

Windows Screenshot Raycast Extension

A Windows-native screenshot extension for Raycast, providing fast, keyboard-driven screen capture capabilities on Windows 10 and 11.

Extension Icon

Features

  • Capture Screen: Instantly captures the entire screen across single or multi-monitor setups.
  • Capture Region: Interactive full-screen selection overlay with real-time dimension indicators (W × H px), blue selection border, and ESC or right-click cancellation.
  • Capture Window: Interactively select and capture any application window with real-time hover highlight and DWM frame precision, excluding invisible drop-shadow margins.
  • Extract Text (OCR): Native Windows WinRT OCR engine extracts text locally and offline from screen captures or image files directly into your clipboard.
  • Flexible Output: Configure output to Save to disk, Copy image directly to the clipboard, or both simultaneously (Save + Copy).
  • High-DPI & Multi-Monitor: Fully DPI-aware coordinate calculation matching actual screen resolution.
  • Zero External Dependencies: Powered natively by Windows GDI32, Win32 APIs, WinRT OCR, and .NET Framework built into Windows.

Commands

CommandDescriptionMode
Capture ScreenCapture a screenshot of the entire screenno-view
Capture RegionSelect a rectangular area of the screen to captureno-view
Capture WindowSelect and capture an application windowno-view
Extract TextExtract text from an image or screenshot using local Windows OCRview

Preferences

You can customize the extension behavior in Raycast Preferences (Cmd/Ctrl + ,):

PreferenceTypeDefaultOptions / Details
Screenshot OutputDropdownSave + CopySave + Copy, Save, Copy
Screenshot Save LocationDirectory~/Pictures/ScreenshotsDirectory path to save image files

Save Location Path Expansion

The save location supports standard Windows path conventions:

  • Tilde expansion: ~/Pictures/Screenshots
  • Environment variables: %USERPROFILE%\Pictures\Screenshots
  • Custom absolute paths: C:\Users\YourName\Desktop

If the destination directory does not exist, it will be created automatically.

File Naming Convention

Screenshots are saved using the timestamp format:

Screenshot YYYY-MM-DD HH-mm-ss.png

Example: Screenshot 2026-08-11 13-42-18.png

If a file collision occurs, unique index suffixes are automatically appended (e.g. Screenshot 2026-08-11 13-42-18 (1).png).


Technical Architecture

This extension uses a native Windows execution engine:

  • GDI32 BitBlt & User32: Used for pixel-perfect frame grabbing from screen device contexts (GetDC, BitBlt).
  • Desktop Window Manager (DWM): DwmGetWindowAttribute with DWMWA_EXTENDED_FRAME_BOUNDS is used to capture visible window bounds cleanly without transparent shadow margins.
  • WinForms Overlay Engine: Interactive region capture utilizes a borderless full-screen form showing a pre-captured desktop image with a dimmed translucent mask (Color.FromArgb(120, 0, 0, 0)), blue bounding box, and dimensions badge.
  • Windows Clipboard (System.Windows.Forms.Clipboard): Writes native DIB/Bitmap image data directly to the clipboard, making it instantly pastable into applications like Paint, Discord, Slack, Photoshop, and web forms.

Development & Contribution

Prerequisites

  • Node.js (v18 or higher)
  • Raycast for Windows

Build & Test Commands

# Install dependencies
npm install

# Start extension in development mode
npm run dev

# Lint source code & metadata
npm run lint

# Build production bundle
npm run build

# Recompile native binaries from C# sources (Windows)
npm run build:binaries

Native Binaries & Build Provenance

This extension bundles two native helper binaries in assets/bin/ to provide sub-20ms instant capture and local OCR without runtime compilation overhead:

Reproducible Builds

Both binaries are compiled deterministically using standard Microsoft .NET Framework C# compiler (csc.exe) built into Windows. You can inspect the source code and rebuild them at any time:

npm run build:binaries
# or: powershell -NoProfile -ExecutionPolicy Bypass -File assets/scripts/build.ps1

For complete compiler flags, referenced assemblies, and SHA-256 checksums, see assets/bin/README.md.

Graceful Fallback: If the binaries are absent or removed, the extension automatically falls back to executing the C# sources dynamically via PowerShell (capture.ps1 and ocr.ps1).


License

MIT