Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
C++

How to Capture Steam Screenshots with the Steam API

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Steamworks provides screenshot capture through ISteamScreenshots, accessed with SteamScreenshots(). For a game that can use Steam’s normal screenshot behavior, leave screenshot handling with Steam. If your game needs to control which frame or image is saved, enable screenshot hooking, handle ScreenshotRequested_t, and submit the image with WriteScreenshot or AddScreenshotToLibrary. In either path, saving is asynchronous: wait for ScreenshotReady_t before attaching screenshot metadata.

What the Steam Screenshots API does

ISteamScreenshots lets a Steam game add images to the user’s local Steam screenshot library and attach supported metadata to them. It supports two different capture flows: Steam can capture the game in response to its screenshot hotkey, or the game can take responsibility for supplying the image. Choose between those flows before writing capture code; they determine who controls the captured frame and how much screenshot-specific work belongs in the game.

The Steam Overlay must be active in the game for the Screenshots system to be available. Steam’s default screenshot hotkey is F12, and users can change it in Steam’s In-Game settings. Obtain the interface through SteamScreenshots() after the game has initialized and can use the Steamworks API.

Choose who handles the screenshot

Approach Who captures the frame? Use it when What the game must do
Steam handles the request Steam’s screenshot system The ordinary Steam capture is suitable and the game does not need to supply a specially processed image. Leave hooking disabled. The game can still receive ScreenshotReady_t and use a successful screenshot handle for supported metadata.
The game hooks requests The game’s screenshot manager or rendering code The game needs to control the selected frame or provide an image it has rendered or processed. Enable hooking with HookScreenshots(true), handle ScreenshotRequested_t, and submit the image using WriteScreenshot or AddScreenshotToLibrary.

Hooking is disabled by default. Enabling it changes responsibility: Steam signals that a screenshot is wanted, but your game must provide the image. Do not enable hooking unless the game has a path to capture and submit that image.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Acer Predator Helios Neo 18 AI Gaming Laptop | Intel Core Ultra 9 Processor 275HX | NVIDIA GeForce RTX 5070 Ti | 18" WQXGA 240Hz G-SYNC | 32GB DDR5 | 2TB Gen 4 SSD | Killer Wi-Fi 6E | PHN18-72-9474
  • Desktop-Level Performance, Anywhere: Get legendary gaming performance with the Intel Core Ultra 9 275HX processor, delivering ultra-smooth gameplay and future-ready AI (Up to 13 NPU TOPS). Offload tasks like background removal and audio optimization to the NPU for seamless streaming and gaming, while Intel Application Optimization enhances performance on classic titles.
  • Game-Changing Realism: Powered by NVIDIA Blackwell architecture, GeForce RTX 5070 Ti Laptop GPU unlocks the game changing realism of full ray tracing. Equipped with a massive level of 992 AI TOPS horsepower, the RTX 50 Series enables new experiences and next-level graphics fidelity. Experience cinematic quality visuals at unprecedented speed with fourth-gen RT Cores and breakthrough neural rendering technologies accelerated with fifth-gen Tensor Cores.
  • Supreme Speed. Superior Visuals. Powered by AI: DLSS is a revolutionary suite of neural rendering technologies that uses AI to boost FPS, reduce latency, and improve image quality. DLSS 4 brings a new Multi Frame Generation and enhanced Ray Reconstruction and Super Resolution, powered by GeForce RTX 50 Series GPUs and fifth-generation Tensor Cores.
  • The Ultimate in Ray Tracing and AI: NVIDIA RTX is the most advanced platform for full ray tracing and neural rendering technologies that are revolutionizing the ways we play and create. Over 700 games and applications use RTX to deliver realistic graphics and incredibly fast performance with cutting-edge AI features like DLSS Multi Frame Generation.
  • Immersive Depth and Detail: At 18 inches with a 16:10 aspect ratio, the pristine WQXGA screen offering vibrant colors with up to 100% DCI-P3 operates at a fast 240Hz refresh and 3ms overdrive response time. Alongside the suite of features from NVIDIA G-SYNC and NVIDIA Advanced Optimus, you're guaranteed that whatever's on-screen is a distinct viewing delight.

Set up the interface and callbacks

Initialize Steamworks using the initialization and callback mechanism already used by your game. Once the Steam Screenshots interface is available, keep its pointer and register handlers for the request and ready callbacks. The example below shows the control flow in C++; it is intended to be integrated with your existing Steamworks initialization and application loop rather than used as a standalone program.

// Illustrative Steamworks C++ integration.
// Construct this handler after Steamworks has initialized.
class ScreenshotHandler {
public:
    ScreenshotHandler()
        : m_ready(this, &ScreenshotHandler::OnScreenshotReady),
          m_requested(this, &ScreenshotHandler::OnScreenshotRequested),
          m_screenshots(SteamScreenshots()) {}

    void UseGameOwnedCapture(bool enabled) {
        if (m_screenshots) {
            m_screenshots->HookScreenshots(enabled);
        }
    }

    void RequestCapture() {
        if (m_screenshots) {
            m_screenshots->TriggerScreenshot();
        }
    }

private:
    void OnScreenshotRequested(ScreenshotRequested_t* event);
    void OnScreenshotReady(ScreenshotReady_t* event);

    ISteamScreenshots* m_screenshots;
    STEAM_CALLBACK(ScreenshotHandler, OnScreenshotReady,
                   ScreenshotReady_t, m_ready);
    STEAM_CALLBACK(ScreenshotHandler, OnScreenshotRequested,
                   ScreenshotRequested_t, m_requested);
};

Use the callback registration form supported by the Steamworks SDK version integrated into your game. Keep the handler alive while callbacks may arrive, and continue processing Steamworks callbacks through your game’s established callback loop. The capture and file-writing functions do not replace that loop.

Capture through Steam or take control

Let Steam handle the default hotkey

If you leave hooking disabled, Steam handles its screenshot hotkey and adds the resulting image to the screenshot library. Your game does not need to intercept the request or submit an image. It can nevertheless process ScreenshotReady_t if it needs to associate supported metadata with a successfully saved screenshot.

Rank #2
Lenovo Legion 5 15IRX10 15.1" WQXGA OLED, Gaming Laptop, Intel Core i9 14th Gen 14900HX 1.6GHz; NVIDIA GeForce RTX 5070 8GB GDDR7; 32GB DDR5 RAM; 1TB NVMe M.2 SSD; Gigabit LAN, 2x2 WiFi 7
  • Intel Core i9 14th Gen 14900HX 1.6GHz Processor, NVIDIA GeForce RTX 5070 8GB GDDR7, 32GB DDR5-5600 RAM
  • 1TB PCIe Gen4 x4 NVMe M.2 SSD
  • 15.1" WQXGA OLED Glossy Display
  • Gigabit LAN, 2x2 WiFi 7 (802.11be), Bluetooth 5.4
  • 4.19 lbs. (1.90 kg),Windows 11 Home

Trigger a screenshot in code

Call TriggerScreenshot() for an in-game screenshot button or another programmatic capture point. Its effect depends on the hook state: without hooking, the overlay takes the screenshot; with hooking enabled, the game’s screenshot manager is told that a screenshot is needed. Thus, the same trigger call does not mean the same capture work is performed in both modes.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
void ScreenshotHandler::OnScreenshotRequested(
    ScreenshotRequested_t* event) {
    // Hooking is enabled: capture the intended game image here,
    // then submit it with WriteScreenshot or AddScreenshotToLibrary.
    // Supply the actual captured image; do not leave the request unanswered.
}

The request callback is the point at which a hooked game should connect Steam’s request to its own capture pipeline. The exact rendering steps depend on the game; the API submission methods accept either raw RGB image data or an existing image file.

Submit an image to the screenshot library

Submit raw RGB data with WriteScreenshot

Use WriteScreenshot(void *pubRGB, uint32 cubRGB, int nWidth, int nHeight) when the game already has the screenshot as a raw RGB buffer. Pass the buffer, its byte count, width, and height. The API expects RGB data, not an encoded PNG or JPEG file. Keep the buffer valid for the call and ensure its byte count and dimensions describe the image you intend to submit.

Rank #3
Sale
Light Gaming Laptop, ΑΜD Ryzen 7430U (Up to 4.3GHz), 16GB RAM 512GB SSD
  • 【EFFICIENT PERFORMANCE】KAIGERR light gaming laptop featuring the latest AMD Ryzen R2544 Processor (boasting 3.7GHz high-frequency). Outperforming the Celeron N5095/N100/N97/N95, it delivers robust multitasking capabilities. The laptop computer has an integrated UHD graphics card clocked at up to 1200MHz for stronger graphics processing performance. KAIGERR laptop is designed to elevate your computing experience.
  • Huge Capacity Storage: KAIGERR laptop comes with 16GB SODIMM DDR4 RAM, advantages of large operating memory capacity both can reduce read latency of memory data and improve CPU utilization for seamless multitasking, paired with a 512GB M.2 NVMe SSD that ensures lightning-fast boot speeds, rapid application loading, and ample storage space for all your files.
  • Brilliant Display & Integrated Graphics: The KAIGERR Light gaming laptop features a brilliant FHD display with an innovative thin-bezel design that maximizes screen space for a truly immersive viewing experience, while the integrated AMD Radeon Graphics deliver smooth and detailed image processing for enjoying computer games and tackling photo editing projects with ease.
  • Rich Interfaces & Wireless Connectivity: KAIGERR traditional laptop offers a variety of connectivity options, including HDMI, Type-C, 3.5mm TRRS Jack, Memory Card Slot and USB3.2 ports. You can easily connect to various devices and peripherals to expand your capabilities. Mini laptop computers equipped with WiFi6 & Bluetooth 5.2 which offer strong wireless signal, fast wireless connections, and reliable transmission speed
  • Portable Design & Durable: KAIGERR laptop compact design makes it easy to carry with you wherever you go. Also, you can enjoy the benefits of a powerful computer without the bulk of a traditional desktop. KAIGERR laptop computers are built with high-quality components and designed to handle heavy workloads and deliver consistent performance and longevity. If you encounter any problems, please contact us and we will help you solve the problem within 12 hours
// rgbPixels must contain the captured image in raw RGB format.
// rgbByteCount, imageWidth, and imageHeight must match that buffer.
ScreenshotHandle handle = screenshots->WriteScreenshot(
    rgbPixels, rgbByteCount, imageWidth, imageHeight);

The returned value is a screenshot handle, but do not treat the return as proof that the save has completed. Saving is asynchronous; use the ready callback and check its result.

Add an existing image file with AddScreenshotToLibrary

Use AddScreenshotToLibrary(const char *pchFilename, const char *pchThumbnailFilename, int nWidth, int nHeight) when the image is already stored on disk. The documented formats are JPG, PNG, and TGA, and the screenshot path must be absolute. Pass the screenshot dimensions. If you supply a thumbnail, it must be 200 pixels wide and have the same aspect ratio as the screenshot. Pass NULL for the thumbnail path if you want Steam to create one.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
// Both paths must be absolute when supplied.
// Passing NULL asks Steam to create the thumbnail.
ScreenshotHandle handle = screenshots->AddScreenshotToLibrary(
    absoluteImagePath, NULL, imageWidth, imageHeight);

For example, if the game writes a PNG to a temporary capture directory, pass that file’s absolute path rather than a path relative to the game’s working directory. Keep the file available for Steam to load while the asynchronous operation completes.

Rank #4
KAIGERR Gaming Laptop, 24GB DDR5 512GB NVMe SSD Laptop Computer with AMD Ryzen 7 H255(8C/16T, Up to 4.9GHz), 16.0 inch Windows 11 Laptop, Radeon RX Vega 8 Graphics,WiFi 6, Backlit KB
  • 【ENGINEERED FOR SPEED】The KAIGERR 2026 RX16 laptop is equipped with the powerful AMD Ryzen 7 H255 processor (8C/16T, up to 4.9GHz), delivering superior performance and responsiveness. This upgraded hardware ensures a smooth experience, fast loading times, and high-quality visuals. It provides an immersive, lag-free experience. Its performance is far moere than 30% better than AMD R7 5700U/5800U/5825U/6600HX/7735HS.
  • 【Advanced Dual-Fan Cooling】KAIGERR’s dual-fan system expels heat faster than standard designs, drastically reducing thermal buildup during intense gaming or work. Optimized airflow keeps components cool, prevents throttling, and maintains smooth, sustained performance—all while staying quiet. Stay cool, play longer.
  • 【INSPIRE YOUR POSSIBILITIES】 The laptop on sale comes with 16GB DDR5 memory and a 512GB M.2 NVMe SSD for faster response times and ample storage. Dual-channel DDR5 memory supports upgrades to 64GB (2x32GB), and NVMe/NGFF SSD can be upgraded to 4TB, providing plenty of space for all your favorite videos/files.
  • 【Vivid 16.0" IPS Display】Featuring a wide color gamut and high refresh rate, the 16.1" IPS screen delivers smoother motion, richer colors, and exceptional detail—surpassing standard displays in both accuracy and immersion. Whether gaming, streaming, or creating, every frame appears lifelike and dynamic for a truly engaging visual experience.
  • 【KAIGERR: Quality Laptops, Exceptional Support.】Enjoy peace of mind with unlimited technical support and 12 months of repair for all customers, with our team always ready to help. If you have any questions or concerns, feel free to reach out to us—we’re here to help.

Wait for the save before adding metadata

Both submission methods are asynchronous. Handle ScreenshotReady_t, inspect its EResult, and use the returned local screenshot handle for metadata only after the result indicates success. The documented callback includes the local handle and result. INVALID_SCREENSHOT_HANDLE is zero; screenshot handles remain valid only for the lifetime of the game process.

void ScreenshotHandler::OnScreenshotReady(ScreenshotReady_t* event) {
    if (event->m_eResult != k_EResultOK) {
        // Record or surface the failure; do not tag this screenshot.
        return;
    }

    ScreenshotHandle saved = event->m_hLocal;
    // Apply supported metadata to saved here, if needed.
}

Use the handle from the successful ready callback for SetLocation, TagUser, or TagPublishedFile. The API reference lists a maximum location string length of 255 bytes, up to 32 users tagged per screenshot, and up to 32 Workshop items tagged per screenshot. These are API limits, not targets: attach only metadata that is meaningful for the image.

Handle common failures and edge cases

  • No screenshot system or no callback: Confirm that the Steam Overlay is active for the game and that Steamworks callback processing continues after initialization. The screenshot feature is unavailable when the Overlay is not active.
  • Hotkey behaves differently than expected: Check whether hooking is enabled. Without a hook Steam handles the capture; with a hook the game receives a request and must supply the image. F12 is the default, but the user can change it in Steam’s In-Game settings.
  • Image does not appear after submission: Do not assume the returned handle means saving has finished. Wait for ScreenshotReady_t and inspect its result. Documented failure outcomes include failure to load or parse the image and disk I/O failure.
  • File submission fails: Verify that the screenshot is a documented JPG, PNG, or TGA file and that its filename is an absolute path. If a thumbnail is supplied, check its 200-pixel width and matching aspect ratio; otherwise pass NULL to request automatic thumbnail creation.
  • Metadata is missing or inconsistent: Apply it only after a successful ready result, using the callback’s local screenshot handle. Do not retain that handle for use beyond the game process.
  • Hooked requests produce no library image: Enabling a hook makes image submission the game’s responsibility. Ensure the request handler reaches a capture path and calls one of the submission methods with valid image data or a readable file.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Reliability and implementation choices

The simplest implementation is to let Steam handle screenshots when its normal capture is sufficient. That leaves the capture itself to the overlay and limits game-owned screenshot logic. Use hooking when the game must select or provide the image; it gives the game control but also makes its capture and submission path responsible for completing each request.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Acer Nitro V 16S AI Gaming Laptop | AMD Ryzen 7 260 Processor | NVIDIA GeForce RTX 5060 Laptop GPU (572 AI Tops) | 16" WUXGA IPS 180Hz Display | 32GB DDR5 | 1TB Gen 4 SSD | Wi-Fi 6 | ANV16S-41-R2AJ
  • AI-Powered Performance: The AMD Ryzen 7 260 CPU powers the Nitro V 16S, offering up to 38 AI Overall TOPS to deliver cutting-edge performance for gaming and AI-driven tasks, along with 4K HDR streaming, making it the perfect choice for gamers and content creators seeking unparalleled performance and entertainment.
  • Game Changer: Powered by NVIDIA Blackwell architecture, GeForce RTX 5060 Laptop GPU unlocks the game changing realism of full ray tracing. Equipped with a massive level of 572 AI TOPS horsepower, the RTX 50 Series enables new experiences and next-level graphics fidelity. Experience cinematic quality visuals at unprecedented speed with fourth-gen RT Cores and breakthrough neural rendering technologies accelerated with fifth-gen Tensor Cores.
  • Supreme Speed. Superior Visuals. Powered by AI: DLSS is a revolutionary suite of neural rendering technologies that uses AI to boost FPS, reduce latency, and improve image quality. DLSS 4 brings a new Multi Frame Generation and enhanced Ray Reconstruction and Super Resolution, powered by GeForce RTX 50 Series GPUs and fifth-generation Tensor Cores.
  • Vibrant Smooth Display: Experience exceptional clarity and vibrant detail with the 16" WUXGA 1920 x 1200 display, featuring 100% sRGB color coverage for true-to-life, accurate colors. With a 180Hz refresh rate, enjoy ultra-smooth, fluid motion, even during fast-paced action.
  • Internal Specifications: 32GB DDR5 5600MHz Memory (2 DDR5 Slots Total, Maximum 32GB); 1TB PCIe Gen 4 SSD (2 x PCIe M.2 Slots | 1 Slot Available)

In either design, treat save completion as a separate stage from capture. A robust integration checks callback results, avoids attaching metadata on failure, and handles image-load or disk-I/O errors rather than assuming every request succeeds. The cited Steamworks documentation does not specify a performance comparison between these paths, so choose based on capture control and implementation needs, not an assumed speed advantage.

Or skip the browser setup

Steam’s API above is for screenshots of a Steam game. ScreenshotNeo is a separate website screenshot API and MCP server for developers; it does not replace ISteamScreenshots or capture a game frame. Use it when your task is capturing web pages instead. One GET request returns an image or PDF, with output format configurable:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo documentation for request options. It can accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, with response headers identifying the page verdict and billing status. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients.

ScreenshotNeo’s free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 screenshots; the other monthly tiers are Growth at $15 for 15,000, Pro at $39 for 60,000, Scale at $99 for 250,000, and Business at $249 for 1,000,000. Yearly billing gives two months free, and every feature is available on every plan. Sign up for ScreenshotNeo’s free plan to try website captures without a card.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read next

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.