Types for working with PNG snapshots.
Snapshot data stays in the browser rather than passing through Elm ports. Elm
receives Metadata with an opaque Handle, which can be used to create a URL
for showing or downloading the PNG.
The browser keeps each successful snapshot until its handle is passed to
Camera.discardSnapshot, or until the camera runtime shuts down. Dropping the
handle from your Elm model, removing an image from the page, or closing the
camera does not release the snapshot. Camera.discardSnapshot releases both
the PNG and any URLs created for it. A browser integration that retains the
immutable Blob returned by cameraRuntime.snapshotBlob(handle) can extend the
underlying data's lifetime beyond that operation.
A browser URL created for showing or downloading a snapshot.
Information about a PNG snapshot stored in the browser.
byteSize is the size of the encoded PNG.
Options for cropping and resizing a PNG snapshot.
The crop uses pixels from the camera image. width and height resize the
result before it is encoded. When only one dimension is given, the original
aspect ratio is preserved.
A rectangular part of the camera image, measured in pixels.
Options that keep the complete camera frame at its original size.
Encode a snapshot handle for an application-owned browser integration.
Decode a snapshot handle returned by an application-owned browser integration.
Get the string value of a snapshot URL.
The URL works until its snapshot is discarded and should not be stored permanently.
A handle for a PNG snapshot stored in the browser.
The snapshot remains stored until this handle is passed to
Camera.discardSnapshotor the runtime shuts down. Handles are never reused.