UNPKG

image-speech-bubble-transformer

Version:

TypeScript library for applying speech bubble effects to images

33 lines 1 kB
export declare enum Orientation { TOP = 1, LEFT = 2, BOTTOM = 3, RIGHT = 4 } export interface SpeechBubbleOptions { mirror?: boolean; orientation?: Orientation; speechBubblePath?: string; } export declare class ImageSpeechBubbleTransformer { private defaultSpeechBubblePath; constructor(assetsDir?: string); /** * Check if the file format is supported */ private checkFileFormat; /** * Transform image with optional mirroring and rotation */ private transformImage; /** * Process image with speech bubble */ processSpeechBubble(inputBuffer: Buffer, options?: SpeechBubbleOptions): Promise<Buffer>; /** * Convenience method to process and save image */ processAndSave(inputBuffer: Buffer, outputPath: string, options?: SpeechBubbleOptions): Promise<void>; } export declare function createSpeechBubbleTransformer(assetsDir?: string): ImageSpeechBubbleTransformer; //# sourceMappingURL=index.d.ts.map