Skip to content

labelScreenshot

Draws a caption band across the bottom of a screenshot.

The image keeps its dimensions exactly: the band is composited OVER the frame, never appended to it, because the store expects a specific size.

Import:

import { labelScreenshot } from 'obsidian-integration-testing';

Signature:

function labelScreenshot(bytes: Uint8Array<ArrayBufferLike>, options: LabelScreenshotOptions): Promise<Uint8Array<ArrayBufferLike>>

Parameters:

ParameterTypeDescription
bytesUint8Array<ArrayBufferLike>The captured PNG.
optionsLabelScreenshotOptionsThe caption.

Returns: Promise<Uint8Array<ArrayBufferLike>> — A Promise that resolves to the labeled PNG, the same size as the input.


Links to this page: