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.DrawStringand/orGraphics.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.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →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.
#1 Best Overall
@{
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
textis the text to overlay, such as a copyright notice or source label.fontColor,fontSize,fontStyle, andfontFamilycontrol its appearance. The documented signature defaults to black, size 12, regular style, and Microsoft Sans Serif.horizontalAlignandverticalAlignposition the text; the documented defaults are right and bottom.opacitycontrols transparency. The default is 100; the example uses 70 so the screenshot remains visible beneath the text.paddingsets 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.
Rank #2
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:
- Decode the uploaded or generated screenshot into an image or bitmap.
- Create a graphics surface over a writable bitmap.
- For text, select a readable font and brush, including a semi-transparent color if desired. For a logo, load its image.
- Draw at a corner or in a repeated pattern, taking care not to obscure important screenshot content.
- Encode the result in the required format, then save it or return it from the application.
- 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.
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, andcapture_pdftools 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.
Rank #4
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.
Recommended Free Tools
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.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteRemote 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.
Quick Recap
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.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →

