# `CaptureSpec`

> Contract 2.0.0 · package sha256 `a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e` · generated from `configurator-runtime.d.ts` by `services/onsite-scripter/scripts/build-contract-docs.mjs`; edit the source, not this file.

Interface · `import type { CaptureSpec } from '@holostep-configurators/runtime-client/contract';` · stable · since 2.0.0 · section 16. Capture, export, AR

What [`capture`](Session.capture.md) takes. Every field is optional: [`capture()`](Session.capture.md) alone is the live view at display size.

## Members

| Member | Kind | Summary |
| --- | --- | --- |
| <a id="source"></a>[`source?`](CaptureSpec.source.md) | property | 'render': off-display; the live camera, accumulators and canvas are untouched. |
| <a id="view"></a>[`view?`](CaptureSpec.view.md) | property | 'render' only; with 'displayed' the capture rejects HoloInputError ('capture-displayed-fixed'). |
| <a id="size"></a>[`size?`](CaptureSpec.size.md) | property | CSS px. |
| <a id="pixelratio"></a>[`pixelRatio?`](CaptureSpec.pixelRatio.md) | property | The image is `size` × `pixelRatio` pixels: pass 1 for an exact pixel size. |
| <a id="background"></a>[`background?`](CaptureSpec.background.md) | property | 'scene': the stage's background. |
| <a id="format"></a>[`format?`](CaptureSpec.format.md) | property | Both sources. |
| <a id="quality"></a>[`quality?`](CaptureSpec.quality.md) | property | 0..1, jpeg only; both sources. |

## Declaration

```ts
export interface CaptureSpec {
  source?: 'render' | 'displayed';
  view?: CameraView | LookAtView;
  size?: {
    width: number;
    height: number;
  };
  pixelRatio?: number;
  background?: 'scene' | 'transparent' | ColorValue;
  format?: 'png' | 'jpeg';
  quality?: number;
}
```

## Generic-API test (spec 3.1)

| Rule | Result |
| --- | --- |
| 1. Neutral name | pass: `CaptureSpec` names no product |
| 2. A precedent | not recorded: no ledger row (coverage.json) names this member or its owner |
| 3. Two apps, or labs | not recorded: no ledger row names this member or its owner |
| 4. The cheaper fix first | not recorded per member (Appendix B decides it per need) |
