UNPKG

@appello/common

Version:

Common package with many useful features for web and mobile development

40 lines (39 loc) 1.05 kB
export interface AwsImageServiceResizeOptions { width?: number; height?: number; fit?: 'cover' | 'contain' | 'fill' | 'inside' | 'outside'; background?: { r: number; g: number; b: number; alpha: number; }; } export interface AwsImageServiceSmartCropOptions { faceIndex?: number; padding?: number; } export interface AwsImageServiceProps { resize?: AwsImageServiceResizeOptions; flatten?: boolean; grayscale?: boolean; flip?: boolean; flop?: boolean; negate?: boolean; normalise?: boolean; tint?: { r: number; g: number; b: number; }; smartCrop?: AwsImageServiceSmartCropOptions; } export declare class AwsImageService { private static instance; private readonly awsUrl; private readonly awsBucket; private constructor(); static initialize(awsUrl: string, awsBucket: string): AwsImageService; private static getInstance; static genAwsImgUrl(key: string, options?: AwsImageServiceProps): string; }