isPng
Decides whether the given bytes are a PNG carrying an IHDR chunk.
Used to fail a capture loudly when a transport hands back something that is not an image, rather than writing a corrupt file to disk.
Import:
import { isPng } from 'obsidian-integration-testing';Signature:
function isPng(bytes: Uint8Array<ArrayBufferLike>): booleanParameters:
| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array<ArrayBufferLike> | The bytes to check. |
Returns: boolean — true when the bytes are a PNG.