> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chromiumly.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Screenshots

> UrlScreenshot, HtmlScreenshot, and MarkdownScreenshot — capture full-page images.

Each screenshot class is instantiated with `new` and exposes `capture(options)` → `Promise<Buffer>` (image bytes).

## UrlScreenshot

```typescript theme={null}
import { UrlScreenshot } from "chromiumly";

const screenshot = new UrlScreenshot();
const buffer = await screenshot.capture({
  url: string;  // required
  // + ScreenshotOptions (properties, wait*, extraHttpHeaders, etc.)
});
```

## HtmlScreenshot

```typescript theme={null}
import { HtmlScreenshot } from "chromiumly";

const screenshot = new HtmlScreenshot();
const buffer = await screenshot.capture({
  html: PathLikeOrReadStream;  // required
  // + ScreenshotOptions
});
```

## MarkdownScreenshot

```typescript theme={null}
import { MarkdownScreenshot } from "chromiumly";

const screenshot = new MarkdownScreenshot();
const buffer = await screenshot.capture({
  html: PathLikeOrReadStream;     // required
  markdown: PathLikeOrReadStream; // required
  header?: PathLikeOrReadStream;
  footer?: PathLikeOrReadStream;
  // + other ScreenshotOptions
});
```

## Screenshot options

* **properties** — `ImageProperties`: `format` (`"png"` | `"jpeg"` | `"webp"`), `quality` (0–100, JPEG), `omitBackground`, `width`, `height`, `clip`
* **waitDelay**, **waitForSelector**, **waitForExpression**
* **extraHttpHeaders**, **failOnHttpStatusCodes**, **failOnConsoleExceptions**, **failOnResourceHttpStatusCodes**, **ignoreResourceHttpStatusDomains**, **failOnResourceLoadingFailed**, **skipNetworkIdleEvent**, **skipNetworkAlmostIdleEvent**
* **optimizeForSpeed** — favor encoding speed over output size
* **cookies**, **downloadFrom**, **webhook**, **userPassword**, **ownerPassword**, **embeds**

See [Types](/reference/types) for `ImageProperties` and related types.
