dwg2bmp Image Quality

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
User avatar
andrew
Site Admin
Posts: 9061
Joined: Fri Mar 30, 2007 6:07 am

dwg2bmp Image Quality

Post by andrew » Tue Sep 23, 2014 8:41 am

From a QCAD user:
I'm using dwg2bmp to export a CAD drawing to a bitmap and the rendered image quality is not good. Would it be better to export to PDF?

User avatar
andrew
Site Admin
Posts: 9061
Joined: Fri Mar 30, 2007 6:07 am

Re: dwg2bmp Image Quality

Post by andrew » Tue Sep 23, 2014 8:44 am

The quality of the image produced by dwg2bmp depends on two factors:
- image resolution used (the number of pixels used to represent the image)
- compression used for formats with lossy compression (JPEG)

For better results, use a higher image resolution and use a format that does not compress or supports loss-less compression (e.g. PNG). JPEG is generally not suitable for images rendered from CAD drawings.

You can indicate the resolution used for the export using the -r switch:

Code: Select all

./dwg2bmp -f -r 10 -m 0 -o example.png example.dxf
This produces an image with 10 pixels per drawing unit. The higher the resolution the larger the bitmap and the better the image quality.
Would it be better to export to PDF?
PDF and Bitmaps are fundamentally different formats:
- Bitmaps contain raster graphics which are based on pixels (small colored dots, like in digital photographs).
- PDF is a vector format (containing lines, curves, ...).

A line exported to a bitmap is turned into small dots, a line exported to PDF is still a line and rendered as such.

Here's a more detailed discussion about vector graphics (DXF, PDF, SVG, ...) vs. raster graphics (BMP, PNG, JPEG, TIFF, ...):
http://www.youthedesigner.com/graphic-d ... r-clients/

Post Reply

Return to “QCAD 'How Do I' Questions”