MCPcopy Create free account
hub / github.com/experdot/pointer / canvasToDataURL

Function canvasToDataURL

src/renderer/src/utils/exporter.ts:74–76  ·  view source on GitHub ↗
(canvas: HTMLCanvasElement, type: string = 'image/png')

Source from the content-addressed store, hash-verified

72 * 将 canvas 转换为 data URL
73 */
74export function canvasToDataURL(canvas: HTMLCanvasElement, type: string = 'image/png'): string {
75 return canvas.toDataURL(type)
76}
77
78/**
79 * 将 data URL 转换为 blob(避免 CSP 问题)

Callers 3

generateImageFunction · 0.90
useMessageImageExportFunction · 0.90
generateImageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected