Page 1 of 1

bitmap export has extra white space

Posted: Wed May 08, 2019 12:24 am
by slcasner
I have a drawing that is a filled rectangle approximately 33 inches wide by 1 inch tall. I want to export it as a 600 DPI bitmap with no margin, so in the export dialog I set the DPI to 600 (resulting in a width of 19740 and height of 615), I set the margin value to zero and unchecked the box for extra margin to compensate for line weight (and I have set the line weight to zero), but the result has an extra white background around the desired image and the aspect ratio is not correct.

My computer is a Macbook Pro running macOS 10.14.4. I was running QCAD-Pro 3.15 which added white on all four sides, but I just now paid to update to the current QCAD-Pro 3.22.0 in the hope that would fix it, but it still adds white on the left and bottom.

The actual dimensions of the drawing are 32.899184 x 1.024624 because the drawing is scaled from an image that I am recreating. The result should be 19740 x 615 pixels. If I trim off the white the result is 19403 x 605 pixels, so 336 pixels of white background on the left and 10 pixels on the bottom. But that aspect ratio is also wrong: for the original drawing it would be 32.1085432, for 19740 x 615 it would be 32.097561, but 19403 x 605 is 32.0710744.

I also tried to scale the drawing very slightly so it would be exactly 19740 x 615 pixels rather than 19739.5102 x 614.774568 pixels, but the scale operation did not change the size of the drawing elements. I thought I had successfully done fine scaling tweaks like that in the past, but I tried multiple times now with no success.

Re: bitmap export has extra white space

Posted: Wed May 08, 2019 9:55 am
by andrew
I've opened a bug report at:
https://qcad.org/bugtracker/index.php?d ... sk_id=1884

There's no easy workaround but a fix will be included in the next snapshot release.

Re: bitmap export has extra white space

Posted: Wed May 08, 2019 5:31 pm
by slcasner
Thanks. Are snapshot releases made on a regular schedule?

Re: bitmap export has extra white space

Posted: Wed May 08, 2019 5:33 pm
by slcasner
Also, should I be able to scale the drawing by a very small amount as I described in my last paragraph of the original post?

Re: bitmap export has extra white space

Posted: Wed May 08, 2019 8:24 pm
by andrew
Are snapshot releases made on a regular schedule?
Usually every 1-3 weeks.
Also, should I be able to scale the drawing by a very small amount as I described in my last paragraph of the original post?
Yes, you can scale by any desired factor.

Re: bitmap export has extra white space

Posted: Thu May 09, 2019 6:08 am
by slcasner
I tried scaling again and there was no change. I selected all (TA), modifymenu, scale, snapintersection and selected the drawing origin as the focus point, then in the scaling dialog just clicked OK because the scaling factors we still as previously entered. There was no change.

Then I repeated this procedure but this time I clicked twice on the button showing a cursor arrow to make sure my factors were enabled (they were) and then clicked twice on the button showing a chain to make sure x and y were separate (they were). This time when I clicked OK the scale operation was effective. So it seems there is a bug there somewhere but its hard to say where.

Re: bitmap export has extra white space

Posted: Thu May 09, 2019 1:12 pm
by andrew
FYI: QCAD Snapshot 3.22.0.11 is now available.

Re: bitmap export has extra white space

Posted: Thu May 09, 2019 10:49 pm
by slcasner
Thanks. The snapshot fixes the bitmap export problem.

Regarding the scaling, please open the file reduced.dxf attached to the initial post and try scaling with an x factor of 1.00036696 and a y factor of 1.0000248 which would change the dimensions from 32.899184 x 1.024624 to 32.9 x 1.025. When I try this there is no change in the size of the drawing. I verified that all the layers are visible and none are locked.

Re: bitmap export has extra white space

Posted: Fri May 10, 2019 12:12 pm
by andrew
Thanks for the details. I can confirm that this does not work (non-uniform scaling of hatches is actually not supported / implemented currently).

Since you're only trying to adjust the size slightly, I'd recommend to stretch the hatches at the ends instead using the Modify > Stretch tool.

Re: bitmap export has extra white space

Posted: Sat May 11, 2019 2:02 am
by slcasner
Thanks. I don't really need to do this minor size adjustment now since the bitmap export gives the desired result even without an exact size match to pixels.

It would be great if an error message would appear in the command line output saying that this non-uniform scaling of hatches is not supported.