kist
Version:
Package Pipeline Processor
29 lines (28 loc) • 1.05 kB
TypeScript
import { Action } from "../../core/pipeline/Action";
import { ActionOptionsType } from "../../types/ActionOptionsType";
/**
* SvgToPngAction converts SVG content to PNG format.
* Uses `canvg` for conversion and `jsdom` for SVG element manipulation.
*/
export declare class SvgToPngAction extends Action {
/**
* Executes the SVG-to-PNG conversion process.
* @param options - Options including SVG content, output path, width,
* and height.
*/
execute(options: ActionOptionsType): Promise<void>;
/**
* Converts SVG content to a PNG file, optionally resizing the output.
* @param svgContent - The SVG content to be converted.
* @param outputPath - The filesystem path where the PNG should be saved.
* @param width - Optional width for resizing.
* @param height - Optional height for resizing.
*/
private convert;
/**
* Provides a description of the action.
* @returns A string description of the action.
*/
describe(): string;
}
export default SvgToPngAction;