LarpixClient/node_modules/super-image-cropper/esm/lib/cropper.d.ts
olcxja 95aaaa69ea big updat:
- update dependencies
- add webp support and webp conversion for profile images
2026-07-02 22:40:46 +02:00

31 lines
1 KiB
TypeScript

import { ICommonCropOptions } from '../index';
import type { IParsedFrameInfo } from './decoder';
export interface IFrameCropperProps {
commonCropOptions: ICommonCropOptions;
}
export declare class FrameCropper {
private frames;
private parsedFrames;
private commonCropOptions;
private convertorCanvas;
private containerCanvas;
private convertCtx;
private containerCtx;
private cropperJsOpts;
private offsetX;
private offsetY;
private containerCenterX;
private containerCenterY;
private resultFrames;
constructor(props: IFrameCropperProps);
init({ commonCropOptions }: IFrameCropperProps): void;
cropGif(parsedFrameInfo: IParsedFrameInfo): Promise<ImageData[]>;
cropStaticImage(canvasImageContainer: HTMLCanvasElement): ImageData;
private transformFrame;
private drawImgDataToCanvas;
private ifDebugRun;
private renderEachFrame;
private setupCanvas;
private setCanvasWH;
private frameToImgData;
}