2018-05-13 00:19:51 +08:00
|
|
|
import {DirectoryDTO} from './DirectoryDTO';
|
2018-11-02 17:40:09 +08:00
|
|
|
import {OrientationTypes} from 'ts-exif-parser';
|
2019-01-14 00:38:39 +08:00
|
|
|
import {MediaDimension, MediaDTO, MediaMetadata} from './MediaDTO';
|
2016-12-28 03:55:51 +08:00
|
|
|
|
2018-11-05 02:28:32 +08:00
|
|
|
export interface PhotoDTO extends MediaDTO {
|
2017-06-11 04:32:56 +08:00
|
|
|
id: number;
|
|
|
|
name: string;
|
|
|
|
directory: DirectoryDTO;
|
|
|
|
metadata: PhotoMetadata;
|
|
|
|
readyThumbnails: Array<number>;
|
|
|
|
readyIcon: boolean;
|
2016-12-28 03:55:51 +08:00
|
|
|
}
|
|
|
|
|
2019-01-12 23:41:45 +08:00
|
|
|
export interface FaceRegionBox {
|
|
|
|
width: number;
|
|
|
|
height: number;
|
|
|
|
x: number;
|
|
|
|
y: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface FaceRegion {
|
|
|
|
name: string;
|
|
|
|
box: FaceRegionBox;
|
|
|
|
}
|
|
|
|
|
2018-11-05 02:28:32 +08:00
|
|
|
export interface PhotoMetadata extends MediaMetadata {
|
2018-12-21 06:02:49 +08:00
|
|
|
caption?: string;
|
|
|
|
keywords?: string[];
|
|
|
|
cameraData?: CameraMetadata;
|
|
|
|
positionData?: PositionMetaData;
|
2018-11-02 17:40:09 +08:00
|
|
|
orientation: OrientationTypes;
|
2018-11-05 02:28:32 +08:00
|
|
|
size: MediaDimension;
|
2017-06-11 04:32:56 +08:00
|
|
|
creationDate: number;
|
2017-07-10 04:00:42 +08:00
|
|
|
fileSize: number;
|
2019-01-12 23:41:45 +08:00
|
|
|
faces?: FaceRegion[];
|
2016-12-28 03:55:51 +08:00
|
|
|
}
|
|
|
|
|
2018-11-18 02:32:31 +08:00
|
|
|
|
|
|
|
export interface PositionMetaData {
|
|
|
|
GPSData?: GPSMetadata;
|
|
|
|
country?: string;
|
|
|
|
state?: string;
|
|
|
|
city?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface GPSMetadata {
|
|
|
|
latitude?: number;
|
|
|
|
longitude?: number;
|
|
|
|
altitude?: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-12-28 03:55:51 +08:00
|
|
|
export interface CameraMetadata {
|
2017-06-11 04:32:56 +08:00
|
|
|
ISO?: number;
|
|
|
|
model?: string;
|
2017-07-11 04:00:22 +08:00
|
|
|
make?: string;
|
2017-06-11 04:32:56 +08:00
|
|
|
fStop?: number;
|
|
|
|
exposure?: number;
|
|
|
|
focalLength?: number;
|
|
|
|
lens?: string;
|
2016-12-28 03:55:51 +08:00
|
|
|
}
|