Skip to content

writeImage

Module @netwiv/api/plugins/clipboard-manager · Kind Function

import { writeImage } from '@netwiv/api/plugins/clipboard-manager';

Writes image buffer to the clipboard.

  • Android / iOS: Not supported.
function writeImage(image: string | number[] | Image | ArrayBuffer | Uint8Array<ArrayBufferLike>): Promise<void>
import { writeImage } from '@netwiv/api/plugins/clipboard-manager';
const buffer = [
// A red pixel
255, 0, 0, 255,
// A green pixel
0, 255, 0, 255,
];
await writeImage(buffer);

Upstream since 2.0.0


Descriptions come from the pinned @tauri-apps/plugin-clipboard-manager@2.3.3 declarations (MIT OR Apache-2.0); imports are shown with @netwiv/api paths.