MCPcopy
hub / github.com/ZToolsCenter/ZTools / setupImageAnalysisAPI

Function setupImageAnalysisAPI

src/main/api/shared/imageAnalysis.ts:213–222  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

211
212// 注册IPC处理器
213export function setupImageAnalysisAPI(): void {
214 ipcMain.handle('analyze-image', async (_event, imagePath: string) => {
215 try {
216 return await analyzeImage(imagePath)
217 } catch (error) {
218 console.error('[ImageAnalysis] 图片分析失败:', error)
219 return { isSimpleIcon: false, mainColor: null, isDark: false, needsAdaptation: false }
220 }
221 })
222}

Callers 1

initMethod · 0.90

Calls 1

analyzeImageFunction · 0.85

Tested by

no test coverage detected