export_gif
Export pixel art animations as GIF files with configurable frame delays for sharing or use in projects.
Instructions
Export as animated GIF
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project identifier | |
| outputPath | Yes | Output file path | |
| frameDelay | No | Delay between frames in milliseconds (default: 100) |
Implementation Reference
- src/server/PiskelServer.ts:1271-1293 (handler)The handler function that executes the export_gif tool logic.
private exportGIF( projectId: string, outputPath: string, frameDelay: number ): object { const piskel = this.getProject(projectId); const gifData = exportAsGIF(piskel, frameDelay); const dir = path.dirname(outputPath); if (!fs.existsSync(dir)) { fs.mkdirSync(dir, { recursive: true }); } fs.writeFileSync(outputPath, gifData); return { success: true, outputPath, size: gifData.length, frameCount: piskel.getFrameCount(), frameDelay, }; } - src/server/PiskelServer.ts:626-640 (registration)The tool registration definition for export_gif.
name: 'export_gif', description: 'Export as animated GIF', inputSchema: { type: 'object', properties: { projectId: { type: 'string', description: 'Project identifier', }, outputPath: { type: 'string', description: 'Output file path', }, frameDelay: { type: 'number',