You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tauri-plugins-workspace/plugins/camera/dist-js/index.d.ts

43 lines
1.0 KiB

// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
export declare enum Source {
Prompt = "PROMPT",
Camera = "CAMERA",
Photos = "PHOTOS"
}
export declare enum ResultType {
Uri = "uri",
Base64 = "base64",
DataUrl = "dataUrl"
}
export declare enum CameraDirection {
Rear = "REAR",
Front = "FRONT"
}
export interface ImageOptions {
quality?: number;
allowEditing?: boolean;
resultType?: ResultType;
saveToGallery?: boolean;
width?: number;
height?: number;
correctOrientation?: boolean;
source?: Source;
direction?: CameraDirection;
presentationStyle?: "fullscreen" | "popover";
promptLabelHeader?: string;
promptLabelCancel?: string;
promptLabelPhoto?: string;
promptLabelPicture?: string;
}
export interface Image {
data: string;
assetUrl?: string;
format: string;
saved: boolean;
exif: unknown;
}
export declare function getPhoto(options?: ImageOptions): Promise<Image>;