How can I convert a DXF/DWG to a bitmap (PNG, TIFF, etc.) with one drawing unit being exported as exactly one pixel?
dwg2bmp with 1 unit = pixel
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
dwg2bmp with 1 unit = pixel
From a QCAD user:
Re: dwg2bmp with 1 unit = pixel
Use -r 1 (resolution of 1) to export a drawing unit to one pixel.
Use -m 0 to remove any margins.
Use -no-weight-margin to avoid adding additional margins to compensate for line weight.
Optional: use -a for antialiasing (to make sure lines along the borders are still visible)
To summarize, you can use a command like this:
Use -m 0 to remove any margins.
Use -no-weight-margin to avoid adding additional margins to compensate for line weight.
Optional: use -a for antialiasing (to make sure lines along the borders are still visible)
To summarize, you can use a command like this:
Code: Select all
dwg2bmp -f -r 1 -m 0 -a -no-weight-margin -o output.png input.dxf