1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00
pigallery2/common/entities/PhotoDTO.ts

62 lines
1.2 KiB
TypeScript
Raw Normal View History

import {DirectoryDTO} from './DirectoryDTO';
2018-11-02 10:40:09 +01:00
import {OrientationTypes} from 'ts-exif-parser';
2019-01-13 17:38:39 +01:00
import {MediaDimension, MediaDTO, MediaMetadata} from './MediaDTO';
2016-12-27 20:55:51 +01:00
2018-11-04 19:28:32 +01:00
export interface PhotoDTO extends MediaDTO {
id: number;
name: string;
directory: DirectoryDTO;
metadata: PhotoMetadata;
readyThumbnails: Array<number>;
readyIcon: boolean;
2016-12-27 20:55:51 +01:00
}
2019-01-12 16:41:45 +01:00
export interface FaceRegionBox {
width: number;
height: number;
2019-03-10 20:57:27 +01:00
left: number;
top: number;
2019-01-12 16:41:45 +01:00
}
export interface FaceRegion {
name: string;
2019-02-04 17:46:27 -05:00
box?: FaceRegionBox; // some faces don t have region ass they are coming from keywords
2019-01-12 16:41:45 +01:00
}
2018-11-04 19:28:32 +01:00
export interface PhotoMetadata extends MediaMetadata {
2018-12-20 23:02:49 +01:00
caption?: string;
keywords?: string[];
cameraData?: CameraMetadata;
positionData?: PositionMetaData;
2018-11-02 10:40:09 +01:00
orientation: OrientationTypes;
2018-11-04 19:28:32 +01:00
size: MediaDimension;
creationDate: number;
fileSize: number;
2019-01-12 16:41:45 +01:00
faces?: FaceRegion[];
2016-12-27 20:55:51 +01:00
}
export interface PositionMetaData {
GPSData?: GPSMetadata;
country?: string;
state?: string;
city?: string;
}
export interface GPSMetadata {
latitude?: number;
longitude?: number;
altitude?: number;
}
2016-12-27 20:55:51 +01:00
export interface CameraMetadata {
ISO?: number;
model?: string;
2017-07-10 22:00:22 +02:00
make?: string;
fStop?: number;
exposure?: number;
focalLength?: number;
lens?: string;
2016-12-27 20:55:51 +01:00
}