If you work with CAD files in .NET, one annoying gap is turning DXF or DWG drawings into images for previews, docs, web apps, or automation.
I recently came across ACadSharp.Image, an open source project built on top of ACadSharp and SixLabors.ImageSharp that focuses exactly on that problem.
It renders DXF/DWG files to common raster formats including PNG, BMP, JPEG, GIF, and WebP, and it does it without requiring AutoCAD.
What stood out to me:
- It ships as both a .NET library and a CLI
- You can control width, height, background color, and output quality
- It supports model space, paper layouts, and viewports
- You can hide specific layers during export
- It supports native AOT publishing for standalone binaries
Here is the kind of CLI flow it enables:
cad-to-image "drawing.dxf" --format webp --width 1400 --height 1400 --quality 85
And a more customized example:
cad-to-image "part.dwg" --format png --width 1800 --height 1200 --background "#0c0c0c"
This feels especially useful for:
- generating preview images for CAD repositories
- producing visual artifacts in CI/CD pipelines
- embedding drawing previews in internal tools or customer portals
- building automated documentation workflows
Project link:
https://github.com/slaveOftime/ACadSharp.Image
What I would want to test next is how it behaves on more complex production drawings, but the direction is already very promising for teams that need CAD-to-image automation inside .NET systems.
Top comments (0)