Page 1 of 1

Strange Dithering Effect with DWG2BMP

Posted: Wed Dec 06, 2017 6:31 am
by jemiah
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
.

Re: Strange Dithering Effect with DWG2BMP

Posted: Wed Dec 06, 2017 4:25 pm
by andrew
Please attach / pm or e-mail your DXF file, so we can help efficiently, thanks.

Re: Strange Dithering Effect with DWG2BMP

Posted: Wed Dec 06, 2017 5:45 pm
by jemiah
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.
.

Re: Strange Dithering Effect with DWG2BMP

Posted: Wed Dec 06, 2017 11:22 pm
by andrew
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.