Skip to content
API reference

provenance-export

Import
import * as api from "@fungi.computer/darkroom/provenance";
Kind Export Description
class ProvenanceExportError A refusal to export unsafe, unsupported or oversized image bytes.
type alias ProvenanceExportFailure Why a lossless public image export was refused.
constant maximumPrintDownloadBytes The admitted Computer file read and generated output share this launch bound.
function stripPrivateProvenance() Lossless browser export. Never mutates the input or falls back to private bytes.

A refusal to export unsafe, unsupported or oversized image bytes.

  • Error
Signature
new ProvenanceExportError(reason, options?): ProvenanceExportError;
Parameter Type Description
reason ProvenanceExportFailure Bounded refusal reason.
options? ErrorOptions -

ProvenanceExportError

Signature
Error.constructor;
Signature
readonly name: "ProvenanceExportError" = "ProvenanceExportError";

Stable export refusal name.

Signature
Error.name;
Signature
readonly reason: ProvenanceExportFailure;

Bounded refusal reason.

ProvenanceExportFailuretype alias

Section titled “ProvenanceExportFailure”
Signature
type ProvenanceExportFailure =
"too-large" | "signed-image" | "invalid-image" | "unsupported-format";

Why a lossless public image export was refused.

maximumPrintDownloadBytesconstant

Section titled “maximumPrintDownloadBytes”
Signature
const maximumPrintDownloadBytes: number;

The admitted Computer file read and generated output share this launch bound.

stripPrivateProvenance()function

Section titled “stripPrivateProvenance()”
Signature
function stripPrivateProvenance(bytes): Promise<{
bytes: Uint8Array;
type: string;
extension: string;
}>;

Lossless browser export. Never mutates the input or falls back to private bytes.

Parameter Type
bytes Uint8Array

Promise<{ bytes: Uint8Array; type: string; extension: string; }>