UNPKG

956 BTypeScriptView Raw
1import { CropperPosition, Dimensions, ImageCroppedEvent, LoadedImage } from '../interfaces';
2import { CropperSettings } from '../interfaces/cropper.settings';
3import * as i0 from "@angular/core";
4export declare class CropService {
5 crop(loadedImage: LoadedImage, cropper: CropperPosition, settings: CropperSettings, output: 'blob', maxSize: Dimensions): Promise<ImageCroppedEvent> | null;
6 crop(loadedImage: LoadedImage, cropper: CropperPosition, settings: CropperSettings, output: 'base64', maxSize: Dimensions): ImageCroppedEvent | null;
7 private cropToBlob;
8 private getCanvasTranslate;
9 private getRatio;
10 private getImagePosition;
11 private getOffsetImagePosition;
12 getResizeRatio(width: number, height: number, settings: CropperSettings): number;
13 getQuality(settings: CropperSettings): number;
14 static ɵfac: i0.ɵɵFactoryDeclaration<CropService, never>;
15 static ɵprov: i0.ɵɵInjectableDeclaration<CropService>;
16}