# Techmannih - We should use fast-xml-parser to p... Channel: #contributor Source: https://discord.com/channels/1233487248129921135/1514860723128369212 Started: 2026-06-12T05:15:41.362000+00:00 Last activity: 2026-06-15T16:36:33.512000+00:00 ## techmannih — 2026-06-12T05:15:41.145000+00:00 We should use fast-xml-parser to parse the imported SVG image so we can extract its shapes, transforms, and fill rules, convert them into paths/polygons, and then generate internal BRep pcb_silkscreen_graphic geometry. ## techmannih — 2026-06-12T05:16:07.810000+00:00 does the sound right? ## KEV0 — 2026-06-12T05:16:43.935000+00:00 I concur ## Seve — 2026-06-12T05:17:42.183000+00:00 I think itd be easier/more universal to use an image analysis and convert to a bitmap internally for silkscreen graphics ## Seve — 2026-06-12T05:18:45.053000+00:00 Unfortunately requires loading an svg to png converter- but we have one iirc <@809856037376491570> ## Seve — 2026-06-12T05:18:55.168000+00:00 Like tscircuit/image-utils (?) ## KEV0 — 2026-06-12T05:19:05.300000+00:00 Does tsciruit already support bitmap by default? ## Seve — 2026-06-12T05:20:11.322000+00:00 We dont have any support for loading graphics afaik ## Seve — 2026-06-12T05:21:11.607000+00:00 Not directly in our core lib ## Seve — 2026-06-12T05:21:38.659000+00:00 So this is our first brush with image filters but we render svgs to pngs for lots of stuff outside the core lib ## KEV0 — 2026-06-12T06:14:04.192000+00:00 Ah I see. I had to make a workaround for my previous PCB build. I wanted to add some icons to the board as part of the aesthetic but since there was no image support the agent tried to rebuild the SVG from scratch to fit what was possible and it did a terrible job. Until I went into Inkscape, recreated the icon as paths. It did not have any issues from there recreating it. ## Seve — 2026-06-12T06:15:05.597000+00:00 Yep, goal is to add image support and direct image import ## Seve — 2026-06-12T06:15:14.363000+00:00 Should make that wayy easier ## techmannih — 2026-06-15T16:36:33.512000+00:00 <@757706909351411845> <@809856037376491570> Can we directly add image import in the core repo? Something like: SVG/Image Import → internally convert to bitmap/PNG → generate silkscreen graphics