API reference
provenance-export
Import
Section titled “Import”import * as api from "@fungi.computer/darkroom/provenance";Exports
Section titled “Exports”| 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. |
ProvenanceExportErrorclass
Section titled “ProvenanceExportError”A refusal to export unsafe, unsupported or oversized image bytes.
Extends
Section titled “Extends”Error
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ProvenanceExportError(reason, options?): ProvenanceExportError;Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
reason |
ProvenanceExportFailure |
Bounded refusal reason. |
options? |
ErrorOptions |
- |
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Error.constructor;Properties
Section titled “Properties”readonly name: "ProvenanceExportError" = "ProvenanceExportError";Stable export refusal name.
Overrides
Section titled “Overrides”Error.name;reason
Section titled “reason”readonly reason: ProvenanceExportFailure;Bounded refusal reason.
ProvenanceExportFailuretype alias
Section titled “ProvenanceExportFailure”type ProvenanceExportFailure = "too-large" | "signed-image" | "invalid-image" | "unsupported-format";Why a lossless public image export was refused.
maximumPrintDownloadBytesconstant
Section titled “maximumPrintDownloadBytes”const maximumPrintDownloadBytes: number;The admitted Computer file read and generated output share this launch bound.
stripPrivateProvenance()function
Section titled “stripPrivateProvenance()”function stripPrivateProvenance(bytes): Promise<{ bytes: Uint8Array; type: string; extension: string;}>;Lossless browser export. Never mutates the input or falls back to private bytes.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
bytes |
Uint8Array |
Returns
Section titled “Returns”Promise<{ bytes: Uint8Array; type: string; extension: string;
}>