.NET Mobile

Capture screenshots in Xamarin

Add screenshot and scrolling GIF capabilities to your Xamarin and .NET MAUI applications with HttpClient. Native performance, shared C# codebase.

Installation

  1. 1HttpClient is included in .NET
  2. 2Get your API key from the dashboard
  3. 3Set the X-KEY header in your requests

Authentication

Include your API key in the X-KEY header with every request:

using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-KEY", "your-api-key");
var bytes = await client.GetByteArrayAsync(url);

Xamarin Screenshot Example

Capture a screenshot or create a scrolling GIF animation with a simple GET request:

Screenshot
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-KEY", "your-api-key");

var bytes = await client.GetByteArrayAsync(
    "https://api.scrnpix.com/screenshot?url=https%3A%2F%2Fexample.com&width=1280&height=720&format=png"
);

// Use bytes with ImageSource.FromStream() or save to file
Animation
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-KEY", "your-api-key");

var bytes = await client.GetByteArrayAsync(
    "https://api.scrnpix.com/animate?url=https%3A%2F%2Fexample.com&scroll_duration=3000&scroll_easing=ease-in-out"
);

// Use bytes for display or save to file

Response Format

On success, the API returns the image binary data directly in the response body.

Status Code200 OK
Content-Typeimage/png, image/jpeg, or image/gif
BodyBinary image data (byte[])
Error ResponseError message with 4xx/5xx status

Key Features

Zero Setup

HttpClient is built into .NET. No platform-specific code or WebView required.

Production Ready

Built on Cloudflare Workers with global edge network. Handles concurrency and browser lifecycle automatically.

Xamarin Integration

Use ImageSource.FromStream() to display. Works with Xamarin.Forms, Xamarin.Native, and .NET MAUI.

Rich Features

Custom viewport sizes, full page capture, PNG/JPEG formats, scrolling GIFs with 15 easing functions.

Frequently Asked Questions

Do I need platform-specific code?

No. HttpClient works in shared code. Display images using ImageSource.FromStream() with a MemoryStream.

Does this work with .NET MAUI?

Yes. Scrnpix works with Xamarin.Forms, Xamarin.Native, and .NET MAUI applications.

How do I display the screenshot in Xamarin?

Use ImageSource.FromStream(() => new MemoryStream(bytes)) to create an ImageSource from the response bytes.

What Xamarin version is required?

Xamarin.Forms 4.0+ or .NET MAUI. The API is a simple HTTP GET request.

Ready to capture screenshots in Xamarin?

Get your API key and start rendering screenshots in seconds. Free tier includes 50 screenshots per month.

Start Free