mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
62 lines
1.2 KiB
TypeScript
62 lines
1.2 KiB
TypeScript
import {DirectoryDTO} from './DirectoryDTO';
|
|
import {OrientationTypes} from 'ts-exif-parser';
|
|
import {MediaDimension, MediaDTO, MediaMetadata} from './MediaDTO';
|
|
|
|
export interface PhotoDTO extends MediaDTO {
|
|
id: number;
|
|
name: string;
|
|
directory: DirectoryDTO;
|
|
metadata: PhotoMetadata;
|
|
readyThumbnails: Array<number>;
|
|
readyIcon: boolean;
|
|
}
|
|
|
|
export interface FaceRegionBox {
|
|
width: number;
|
|
height: number;
|
|
x: number;
|
|
y: number;
|
|
}
|
|
|
|
export interface FaceRegion {
|
|
name: string;
|
|
box: FaceRegionBox;
|
|
}
|
|
|
|
export interface PhotoMetadata extends MediaMetadata {
|
|
caption?: string;
|
|
keywords?: string[];
|
|
cameraData?: CameraMetadata;
|
|
positionData?: PositionMetaData;
|
|
orientation: OrientationTypes;
|
|
size: MediaDimension;
|
|
creationDate: number;
|
|
fileSize: number;
|
|
faces?: FaceRegion[];
|
|
}
|
|
|
|
|
|
export interface PositionMetaData {
|
|
GPSData?: GPSMetadata;
|
|
country?: string;
|
|
state?: string;
|
|
city?: string;
|
|
}
|
|
|
|
export interface GPSMetadata {
|
|
latitude?: number;
|
|
longitude?: number;
|
|
altitude?: number;
|
|
}
|
|
|
|
|
|
export interface CameraMetadata {
|
|
ISO?: number;
|
|
model?: string;
|
|
make?: string;
|
|
fStop?: number;
|
|
exposure?: number;
|
|
focalLength?: number;
|
|
lens?: string;
|
|
}
|