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

There is no universal “screenshot quality” switch in C#. First identify what you are capturing (a .NET MAUI app, a Windows window, a browser page, or another surface), then separate four decisions: captured pixel dimensions, image format, compression, and visual fidelity. The .NET MAUI screenshot API captures the app’s currently displayed screen and reports its dimensions, but its documented CaptureAsync() method does not accept a quality, resolution, format, or compression argument. Control encoding in the image-writing API that you choose after capture, and avoid resizing or lossy recompression when you need pixel fidelity.

What “quality” means in a C# screenshot

Before changing code, decide which result you need:

  • Dimensions: the number of output pixels. More pixels preserve more detail, but only if the source surface was captured at that size.
  • Format: PNG, JPEG, HEIC, or another encoder. Lossless formats preserve pixels; lossy formats trade fidelity for smaller files.
  • Compression: the encoder’s size-versus-quality setting. A quality number is not universal: each encoder defines its own scale and behavior.
  • Visual fidelity: whether the intended window, colors, alpha, dynamic range, cursor, shadows, and overlays are present.

A blurry result can come from capturing too few source pixels, resizing afterward, or applying lossy compression. Diagnose those stages separately instead of assuming that a larger quality value can restore missing detail.

Choose the capture API before choosing settings

Capture target What to establish first Quality controls you can legitimately claim
.NET MAUI app Whether the platform supports the MAUI screenshot feature The documented API captures the displayed app screen and returns its dimensions; no quality or output-size parameter is documented.
Windows desktop or window The specific Windows capture API and target framework Depends on that API; do not substitute MAUI parameters.
Browser-rendered page Browser automation or a screenshot service Viewport, device scale, wait conditions, format, and post-capture encoding belong to the selected tool.
Apple screen content Apple ScreenCaptureKit rather than a generic C# assumption Apple’s SCScreenshotConfiguration exposes width, height, content type (including HEIC, JPEG, and PNG), dynamic-range and capture-region properties. These are Apple-platform controls, not documented MAUI behavior.

Microsoft’s MAUI screenshot guide describes an IScreenshot interface that captures the current displayed screen of the app. The [CaptureAsync() API reference](https://learn.microsoft.com/en-us/dotnet/api/microsoft.maui.media.screenshot.captureasync) specifies a Task<IScreenshotResult> return value and documents FeatureNotSupportedException when capture is unavailable.

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

Capture a .NET MAUI screen in C#

Check support and capture the displayed app

Use the support check first, then capture asynchronously. The result exposes width and height as information about what was captured; they are not arguments that set a custom resolution.

using Microsoft.Maui.Media;

public async Task<byte[]?> CaptureMauiScreenAsync()
{
    if (!Screenshot.Default.IsCaptureSupported)
        return null;

    try
    {
        IScreenshotResult result = await Screenshot.Default.CaptureAsync();
        if (result == null)
            return null;

        // These values describe the captured result.
        int width = result.Width;
        int height = result.Height;

        await using Stream input = await result.OpenReadAsync();
        using var memory = new MemoryStream();
        await input.CopyToAsync(memory);
        return memory.ToArray();
    }
    catch (FeatureNotSupportedException)
    {
        // The current device/platform cannot provide a screenshot.
        return null;
    }
}

Save the returned bytes directly when you want to preserve the encoder and dimensions supplied by the platform. If you need a different format or compression level, pass the stream through a format-specific encoder supported by your target framework. The MAUI documentation does not establish which encoder packages, formats, or quality scales you should use, so verify the encoder’s own documentation rather than assuming that a value such as “90” means the same thing everywhere.

Verify dimensions before blaming compression

  1. Log result.Width and result.Height.
  2. Compare those dimensions with the display or window size you intended to capture.
  3. Check whether another part of your pipeline resizes the image for storage, upload, or a UI preview.
  4. Only then test a different encoder or compression setting.

If the source dimensions are already smaller than required, encoding cannot create real detail. Capture the correct surface or use a platform API that explicitly supports the required dimensions.

Format and compression: apply them in the encoder

PNG for exact UI pixels

PNG is generally the safer choice for text, line art, screenshots with sharp edges, and transparency because it is lossless. It can still produce large files. Choose it when visual fidelity matters more than transfer size, and avoid opening and re-saving it through a lossy format later.

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

JPEG when size matters more than exact pixels

JPEG is lossy. Its quality control belongs to the JPEG encoder you actually call, and the accepted range and visual effect vary by library. Test at the output dimensions you will deliver, inspect text and gradients, and record the encoder and setting alongside your files so the result is reproducible.

HEIC and other platform-specific formats

Apple’s [SCScreenshotConfiguration documentation](https://developer.apple.com/documentation/screencapturekit/scscreenshotconfiguration) lists HEIC, JPEG, and PNG as content-type choices and also describes width, height, dynamic-range, and capture-region properties. That API is an Apple ScreenCaptureKit contract; it does not make those controls available through .NET MAUI or every C# runtime. Confirm decoder support wherever the file will be viewed or processed.

Keep an encoding policy

  • Define a target maximum width and height for your application, not a universal “best” number.
  • Keep the original capture when you may need to crop or re-encode later.
  • Perform one final resize, using a high-quality resampling mode in your chosen imaging library, rather than repeatedly scaling.
  • Choose the final format based on content: lossless for UI text and diagrams; lossy only when its size benefit is acceptable.
  • Document the library, format, quality parameter semantics, color profile handling, and alpha behavior.

Control visual fidelity at capture time

Compression cannot fix the wrong content. Decide whether the requirement includes:

  • Only the app surface or the whole desktop/window.
  • A crop or region instead of the complete display.
  • Cursor, shadows, overlays, and system decorations.
  • Wide-gamut or HDR content and how it will be represented in the output.
  • Animated or lazy-loaded content that may not be ready when the capture occurs.

These controls are API-specific. Do not copy a property from Apple ScreenCaptureKit into MAUI code, and do not assume a browser screenshot tool behaves like a native desktop capture.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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

Browser screenshots from C#: avoid building the capture pipeline yourself

If your target is a web page, a browser automation stack must handle navigation, viewport and device scale, waits, consent dialogs, popups, network failures, and encoding. A screenshot service can provide those controls without requiring you to maintain browser binaries and timing logic.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server. It removes cookie/consent banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, with the outcome reported in X-Page-Verdict and X-Billed headers. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients.

One GET request returns PNG, JPEG, WebP, or PDF. The API supports full-page captures with lazy images loaded, CSS-selector element capture, dark mode, 12 device presets or custom viewports, retina scale, PDF paper and margin options, custom CSS and JavaScript, pre-capture clicks, hidden selectors, selector/delay/network-idle waits, request and resource blocking, headers, cookies, user agents, authorization, timezone, geolocation, transparent backgrounds, resizing, a chosen cache TTL, signed image links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, a usage API, and an OpenAPI specification. Parameter names used by other screenshot APIs also work, easing migration.

See the ScreenshotNeo documentation for authentication and options. The following calls use the documented API shape:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

The free plan includes 1,000 screenshots per month without a card. Paid plans start at $5 for 3,000 shots; every feature is included on every plan, and yearly billing provides two months free. Create a free ScreenshotNeo account to try it.

Performance, reliability, and cost decisions

Native app capture

  • Keep capture off the UI thread by awaiting the asynchronous method.
  • Dispose input streams and output streams promptly.
  • Expect platform variation: a capability check can pass on one device and fail on another.
  • Store dimensions and format metadata with the file so downstream systems do not guess.

Web capture

  • Wait for a meaningful selector, a controlled delay, or network idle when content is asynchronous.
  • Use caching only when stale content is acceptable; set a TTL that matches your freshness requirement.
  • For large batches, asynchronous jobs or bulk requests can reduce client overhead, while webhooks avoid long polling.
  • Inspect verdict and billing headers so failures and cache hits are handled differently from successful, billable captures.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting screenshot quality

The screenshot is blurry

  • Check captured width and height first; insufficient source pixels are not repaired by JPEG quality.
  • Find accidental CSS, preview, or upload resizing and remove repeated scaling.
  • Compare a lossless output with the lossy version to isolate encoder artifacts.

Text has halos or block artifacts

Use a lossless format or a less aggressive setting in the specific JPEG encoder. Keep the original PNG for archival or later edits.

The MAUI call fails

Read Screenshot.Default.IsCaptureSupported before calling CaptureAsync(), and handle FeatureNotSupportedException. The documented API may not be available on the current platform or device.

The wrong content appears

Confirm that you selected the correct capture API and that the app or page was ready. For web pages, add a selector or network-idle wait and remove overlays before capture.

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

The file is unexpectedly large

Check dimensions, alpha, and format first. Reduce dimensions only when the delivery requirement permits it; otherwise choose an encoder setting appropriate to the content and measure the resulting file.

A web request returns a failure or blank page

Inspect X-Page-Verdict and X-Billed, then check authentication, waits, blocked resources, cookies, and the target URL. A failed load, blank page, bot check, timeout, or cache hit is not billed by ScreenshotNeo.

A practical quality checklist

  1. Name the platform and capture target.
  2. Define required dimensions and whether cropping is allowed.
  3. Capture once and record returned dimensions.
  4. Select a format based on text, transparency, color, and file-size needs.
  5. Apply compression only in a documented, format-specific encoder.
  6. Inspect the final delivered file, not just an in-memory preview.
  7. For browser pages, wait for content, remove overlays, and verify billing and verdict headers.

Frequently Asked Questions

Can MAUI CaptureAsync accept a JPEG quality value?

No. The documented MAUI method has no quality, dimensions, format, or compression argument; encoding must be handled separately.

Does increasing JPEG quality increase screenshot resolution?

No. JPEG quality changes encoding artifacts and file size. Resolution is determined by captured pixel dimensions and any later resizing.

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.

Can I use Apple ScreenCaptureKit settings in a C# MAUI app?

Not as a general MAUI contract. Width, height, content type, dynamic range, and region settings belong to Apple’s ScreenCaptureKit API.

What should I log for reproducible screenshots?

Record the capture API and platform, returned dimensions, final format, encoder/library version, compression setting, resize step, and color/alpha handling.

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.