UNPKG

svg-inplace-rasterize

Version:

Rasterize parts of an SVG to keep it animatable while reducing size and improving render time.

17 lines (16 loc) 520 B
/// <reference types="node" /> /// <reference types="cheerio" /> import stream from 'stream'; interface InplaceRasterizerOptions { multiplier?: number; filter: ($: CheerioStatic) => Cheerio | CheerioElement[]; format?: 'png' | 'webp'; } export declare class InplaceRasterizer { rasterize(readable: stream.Readable, options: InplaceRasterizerOptions): Promise<string>; rsvgConvert(orig: string, options: { multiplier: number; unlimited?: boolean; }): Promise<Buffer>; } export {};