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

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

For classic ASP.NET Web Pages, the shortest documented route is to load an image with WebImage, call AddTextWatermark, save the modified image, and render that saved file. For more control—or for a logo watermark—draw onto the image with System.Drawing.Graphics. If you need the screenshot captured and processed remotely, a screenshot API can apply a watermark as part of capture.

Choose where the watermark belongs in your ASP.NET flow

There are two distinct jobs: watermark an image you already have, or generate a screenshot and watermark it during capture. For an existing local image in a classic ASP.NET Web Pages application, WebImage.AddTextWatermark is the compact option. Use drawing primitives when you need a logo, exact positioning, or composition beyond the helper’s settings. A capture API is a different deployment model: it generates the screenshot rather than modifying a file your application already has.

  • Existing image, simple text: use WebImage.
  • Logo, custom layout, or more control: use Graphics.DrawString and/or Graphics.DrawImage.
  • Screenshot generated remotely: configure watermarking in the capture service’s options.

The Microsoft example below applies to classic ASP.NET Web Pages and its WebImage helper. It is not an instruction to use that helper in every ASP.NET project type; select an image-processing approach appropriate to your application’s framework and deployment.

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

Add text with WebImage in classic ASP.NET Web Pages

Microsoft documents AddTextWatermark as adding watermark text to an image. Its parameters allow you to set the text, color, size, font style and family, horizontal and vertical alignment, opacity, and padding. The following Razor pattern follows Microsoft’s documented flow: load the source, apply the watermark, save to a writable destination, then point an image element at the saved file. See the Microsoft tutorial and API reference.

@{
    var imagePath = "";
    WebImage photo = new WebImage(@"~ImagesScreenshot.png");

    if (photo != null)
    {
        imagePath = @"imagesScreenshot-watermarked.png";
        photo.AddTextWatermark(
            "© Example.com",
            fontColor: "White",
            fontSize: 12,
            fontStyle: "Regular",
            fontFamily: "Arial",
            horizontalAlign: "Right",
            verticalAlign: "Bottom",
            opacity: 70,
            padding: 10);
        photo.Save(@"~" + imagePath);
    }
}
<img src="@imagePath" alt="Watermarked screenshot" />

What each setting controls

  • text is the text to overlay, such as a copyright notice or source label.
  • fontColor, fontSize, fontStyle, and fontFamily control its appearance. The documented signature defaults to black, size 12, regular style, and Microsoft Sans Serif.
  • horizontalAlign and verticalAlign position the text; the documented defaults are right and bottom.
  • opacity controls transparency. The default is 100; the example uses 70 so the screenshot remains visible beneath the text.
  • padding sets spacing from the edges. The default is 5; the example uses 10.

The complete documented signature is WebImage AddTextWatermark(string text, string fontColor = "Black", int fontSize = 12, string fontStyle = "Regular", string fontFamily = "Microsoft Sans Serif", string horizontalAlign = "Right", string verticalAlign = "Bottom", int opacity = 100, int padding = 5). Named arguments, as shown above, make it easier to see which settings have been customized.

Save and serve the modified file

The watermark is applied before Save. The destination must be writable—not read-only—and the image shown to the visitor must be the saved, watermarked path rather than the original source. In the example, imagePath is set to the relative output path and used in the img element.

For production code, ensure the output directory exists and is writable by the application identity, and choose a destination name that will not overwrite an original users may still need. If source or destination paths can be influenced by user input, validate them rather than concatenating untrusted path text into a filesystem path.

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

Draw a custom text watermark or logo

When the helper’s text options are not enough, use a graphics surface over a writable bitmap. Graphics.DrawString draws text using a Font and Brush at a point or within a rectangle; an optional StringFormat can control alignment and other formatting. For a logo or other image watermark, Graphics.DrawImage draws an image into a destination rectangle and can scale it to fit. See Microsoft’s references for DrawString and DrawImage.

The general composition sequence is:

  1. Decode the uploaded or generated screenshot into an image or bitmap.
  2. Create a graphics surface over a writable bitmap.
  3. For text, select a readable font and brush, including a semi-transparent color if desired. For a logo, load its image.
  4. Draw at a corner or in a repeated pattern, taking care not to obscure important screenshot content.
  5. Encode the result in the required format, then save it or return it from the application.
  6. Dispose of image, graphics, font, brush, and stream objects according to the chosen library’s lifetime rules.

This is a composition recipe, not a framework-independent, drop-in ASP.NET implementation: image decoding, output encoding, and response handling depend on the project and image library. Keep the original image unmodified if the application needs to preserve an unwatermarked source, and avoid sharing mutable image objects across concurrent requests.

Text versus image watermark

Need Drawing approach Useful control
Text label, copyright, or attribution Graphics.DrawString Choose a font and brush; draw at a point or in a rectangle; use StringFormat for alignment.
Brand mark or other graphic Graphics.DrawImage Draw the logo into a destination rectangle; scale it to fit the chosen placement.
Text and logo together Use both drawing methods on the same graphics surface Control each overlay’s placement and keep screenshot content legible.

Watermark screenshots during remote capture

If your application creates screenshots through a hosted capture service, watermarking can be configured as part of capture rather than as a later local image-processing step. GrabzIt’s ASP.NET documentation describes custom watermark identifiers for image, animation, video, and PDF capture options. It also lists special watermark types for timestamps, text, counters, and browser windows. Check the service’s current documentation for the exact option names and setup applicable to your capture workflow; the cited material establishes the available categories, not a universal code sample.

The trade-off is architectural: local processing gives your application control over an image it already owns, while capture-time processing places screenshot generation and watermarking in the hosted workflow. Choose based on where the screenshot originates and which watermark types you need.

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

Or skip the browser setup

If the underlying task is capturing a web page, ScreenshotNeo is a screenshot API and MCP server. It can return a PNG, JPEG, WebP, or PDF from one GET request. The request below captures the page; add a later image-processing step if you need to overlay a custom watermark. See the ScreenshotNeo API documentation for request options.

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}`);
  • Cookie and consent banners are accepted like a visitor and removed, along with supported newsletter popups and chat widgets; each of these steps can be turned off.
  • Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing; response headers report the page verdict and billing status.
  • An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents and MCP clients.
  • The Free plan includes 1,000 shots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is on every plan.

Sign up free for 1,000 screenshots a month, with no card required.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting watermark output

The output file is not created

Check that the destination directory exists and that the application can write to it. Microsoft’s tutorial specifically cautions that the saved image must not be read-only. Also confirm that the path passed to Save points where the application expects.

The page still shows the original image

Confirm that the img element uses the output path assigned before saving, not the source path. If the browser or an intermediary is serving a cached image under a reused filename, save to a distinct output name or refresh the relevant cache.

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

The text is hard to read or hides content

Adjust the font color, size, opacity, alignment, and padding in AddTextWatermark. With custom drawing, change the font or brush and reposition the text or logo. A watermark should identify the image without covering the details a reader needs to inspect.

A logo looks stretched or too large

Use a destination rectangle appropriate to the logo’s proportions when calling DrawImage. The method supports drawing into a rectangle and scaling, so size the destination deliberately rather than treating the logo as text.

The screenshot is missing or capture does not complete

Separate capture failures from watermarking failures: first establish that the capture service produced an image or PDF, then inspect the post-processing step. For a remote service, consult its current response details and configuration documentation; the GrabzIt material cited here does not specify particular error codes or retry rules.

Performance, reliability, and cost considerations

With local watermarking, the application performs image decode, drawing, and encoding work for each image it processes. The exact time and memory use depend on image dimensions, output format, and implementation; no benchmark is established here. Avoid unnecessary repeated processing by keeping a watermarked output when it can safely be reused, and use distinct source and destination files when the original must remain intact.

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

Remote capture moves screenshot generation to a service and may simplify browser setup, but it also means your flow depends on a network request and the provider’s capture behavior. For ScreenshotNeo, cache hits and the listed unsuccessful or blocked page outcomes are not billed, with response headers indicating verdict and billing. Current plan pricing is shown on its site; the included free allowance and starting paid tier are stated above.

Frequently asked questions

Can I add a watermark to a PDF screenshot?

The cited GrabzIt documentation describes watermark identifiers for PDF capture options. For a PDF you already have, the approach differs from drawing onto a raster screenshot; use a PDF-aware workflow rather than assuming WebImage applies.

Can the watermark be a timestamp or counter?

GrabzIt’s ASP.NET capture documentation lists timestamp and counter watermarks, as well as text and browser-window types. The WebImage.AddTextWatermark helper accepts text, so a timestamp or counter would need to be supplied as text by your application if using that route.

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.

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