Strange Dithering Effect with DWG2BMP

If you are having problems with QCAD, post here. Please report bugs through our Bug Tracker instead.

Always attach your original DXF or DWG file and mentions your QCAD version and the platform you are on.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
jemiah
Registered Member
Posts: 2
Joined: Tue Dec 05, 2017 9:40 pm

Strange Dithering Effect with DWG2BMP

Post by jemiah » Wed Dec 06, 2017 6:31 am

Using: QCAD version 3.19.1
OS: Ubuntu 17.04

I'm attempting to render a DXF file exported from Adobe Illustrator. I've been extracting data from the exported DXF file using a Python library and so far it's been very well formed with no strange proprietary weirdness. I rendered the DXF file into a PNG using the following command line (adjusted for brevity):

Code: Select all

dwg2bmp -quality=100 -window=9.555555555555555,9.666666666666664,4.5,6.5  -margin=0 -background=transparent -f -width=1350 -height=1950 -o output.png input.dxf
In my two attachments you can see the original file (original.png) and the result (qcad_render.png). At every boundary there is this strange dithering effect. To call a specific example, look at the shadow of he letter "I". it has a white ring around it that isn't present in the original. It's almost like parts of the image are too low of a resolution but the gaps got filled in with white.

Has anyone ever seen some thing like this before? Any ideas on how to fix/compensate for this?

Thanks
.
Attachments
original.png
This is an example of the original DXF data
original.png (42.19 KiB) Viewed 3239 times
qcad_render.png
This is the output of dwg2bmp.
qcad_render.png (141.58 KiB) Viewed 3239 times

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

Re: Strange Dithering Effect with DWG2BMP

Post by andrew » Wed Dec 06, 2017 4:25 pm

Please attach / pm or e-mail your DXF file, so we can help efficiently, thanks.

jemiah
Registered Member
Posts: 2
Joined: Tue Dec 05, 2017 9:40 pm

Re: Strange Dithering Effect with DWG2BMP

Post by jemiah » Wed Dec 06, 2017 5:45 pm

Sorry about that. I needed to remove a lot of private information from the file. Attached you'll find the DXF file exported from Adobe Illustrator (QCAD_forum_Example.dxf). The color background gets exported as a separate raster (QCAD_forum_Example_1.png) which I've included only for completeness. It shouldn't be needed for the purpose of the example.
.
Attachments
QCAD_forum_Example.dxf
(189.24 KiB) Downloaded 277 times
QCAD_forum_Example_1.png
QCAD_forum_Example_1.png (1.8 KiB) Viewed 3225 times

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

Re: Strange Dithering Effect with DWG2BMP

Post by andrew » Wed Dec 06, 2017 11:22 pm

Thanks.

Unfortunately, it seems that Adobe Illustrator exports white splines along the borders of those colored shapes. QCAD renders those splines under the filling, but even if a line is only one pixel wide, if it is exactly at the edge of a filling, some pixels will be visible which is what you are seeing.

There's not a lot you can do about this, short of deleting all those splines in all blocks. Or maybe there is a way to configure Illustrator to not export the outlines at all.

Post Reply

Return to “QCAD Troubleshooting and Problems”