forked from olcxjas-softworks/LarpixClient
31 lines
1 KiB
TypeScript
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;
|
|
}
|