Image Imports too large (SOLVED)

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
doncraig
Junior Member
Posts: 13
Joined: Wed Jun 11, 2025 3:46 pm
Location: Fife, Scotland

Image Imports too large (SOLVED)

Post by doncraig » Thu Jun 12, 2025 9:28 pm

I have an Image on an A4 sheet that I imported into QCad. The sheet shows as nearly 4500 x 6500 whatever the sizes are on the screen but not the 210mm x 297mm I was expecting. How can I sort this out ? Please.
doncraig
Screenshot 2025-06-12 211856.jpg
Screenshot 2025-06-12 211856.jpg (165.61 KiB) Viewed 16107 times
Last edited by doncraig on Mon Jun 23, 2025 2:34 pm, edited 1 time in total.

CVH
Premier Member
Posts: 4957
Joined: Wed Sep 27, 2017 4:17 pm

Re: Image Imports too large

Post by CVH » Fri Jun 13, 2025 12:02 am

Hi,

Your image is probably a bitmap ...
Assuming your drawing unit is 'mm'.
It would have been handy if at least the picture file was attached, see How to.
Also see above Forum Rules in red.

Bitmaps don't store their actual size apart from NxM pixels.
The size of the visual representation depends on the DPI (screen/paper/...).

On importing QCAD treats 1 pixel as 1 drawing unit by 1 drawing unit.
Suspecting that the bitmap is '4500 x 6500 or whatever' in pixels.
The aspect ratio of ISO A paper is sqrt(2) or 1.41421356..., 6500 divided by 4500 is 1.444... (not really a match)

On inserting a Bitmap QCAD displays the Width and the Height on the Options Toolbar.
- Initially the width and height in pixels.
- Ensure that the 'Keep Proportions' button is active (connected chain icon).
- Alter Width to 210, Height should adapt to about 297 OR alter Height to 297, Width should adapt to about 210.
If that is not the case then the aspect ratio of the Bitmap does not match with that of an ISO A page.

With 'Keep Proportions' inactive you can adapt both values but remind that you are scaling the Bitmap not uniform in X and Y.
This may change the original aspect ratio of your Bitmap in QCAD.

Technical detail: Screen dots are not per definition squares, printer dots can be. :wink:
One by one drawing units in vector art is exact.


Afterwards, if the Bitmap is already inserted as entity.
- Select it.
- Start the Scale (SC) tool.
- QCAD requires a focus point, as per screen capture for example the left lower corner = drawing origin.
- In the Dialog: opt for 'Delete Original', 'Proportional' active and set an appropriate scale factor. e.g. '210/4500' or 0.4666...
Input fields for values support simple to complex equations without the '=' symbol.
- Acknowledge the dialog.

The Bitmap entity in the drawing is now scaled with a fixed aspect ratio.
Not proportional you can enter 2 scale factors.


Quick and dirty:
- Select the Bitmap.
In the Property Editor:
- Set 'Width Factor' to '210/4500' (=0.4666...) here '4500' is the current Width.
- Set 'Height Factor' to '297/6500' (=0.0456923...) here '6500' is the current Height.
Scaling the Bitmap not uniform with the given numbers.
But then you're comparing sour apples with potatoes, taking pixels for drawing units :wink:.


To convert geometry in a Bitmap to vectors you have at best 2 known dimensions in orthogonal directions.
Then it is possible to scale the Bitmap almost correctly in X and in Y.
Tracing the outline as vector line art afterwards.

Another route is tracing the Bitmap as it is, scaling the vector art afterwards.

Bitmaps may also be rotated slightly.
Then 'Align Reference Points' (AE) with 'Scale' active can be handy.
Aligning 2 known, almost diagonally opposite points, in the Bitmap with 2 target positions in the drawing.

Regards,
CVH

doncraig
Junior Member
Posts: 13
Joined: Wed Jun 11, 2025 3:46 pm
Location: Fife, Scotland

Re: Image Imports too large

Post by doncraig » Fri Jun 13, 2025 10:19 am

Sorry about missing out the image. I have attached it now. Just to explain a bit, I have a lot of A3 sheets that I can manipulate on my Brother Printer/Scanner. I open these sheets using Gimp and use Rectangle Select to select the single frame I want, I then Crop to Selection and save as a .jpg this jpg is then saved on an A4 sheet and this is the sheet I use to Import into QCad . I may have to find a different way to prepare these images for Laser Cutting.
2b.jpg
2b.jpg (488.97 KiB) Viewed 16001 times
I hope this helps. I will see what I can do with your explanation now and let you know what happens.
doncraig
EDIT I have read and reread the explanation you have given, thank you very much. I still have no idea but will try and see what turns up. Thanks again

CVH
Premier Member
Posts: 4957
Joined: Wed Sep 27, 2017 4:17 pm

Re: Image Imports too large

Post by CVH » Fri Jun 13, 2025 11:58 am

The size of this image is 4912 x 9670 in pixels.
The aspect ratio is even worse compared with the expected sqrt(2).

I understand that the A3 sheets have various shapes on them.
You then scan that with an A4 scanner, top half & bottom half.
What is the resolution or DPI of the scanner?

I would use the scanned input directly and trace each shape of that.
The larger and more detailed (e.g. 600dpi) an image is to trace ...
... The better the trace will be in vectors.
Vector art can be scaled to any size without loosing data or accuracy (almost).

The information will not get any better beyond this point.
Data in a JPG file is not lossless compressed.
You loose original information on each decompression, cropping and re-compression.

You also know that the scanned data is an A4 page and can work out the Bitmap scale factors.
Those are expected to fit the paper aspect ratio better.
You can even combine scanning with some ruler marks on or under the A3 content.
Then you can scale the scanned A4 data with some degree of certainty.

A bit as CSI documenting a crime scene with photos using an L shape ruler so that the size is well known.

You state 'this jpg is then saved on an A4 sheet' but that comes after it is cropped and saved as a JPG.
What you probably mean is:
- Crop a certain rectangular area of the scanned page.
- In Gimp set the cavans size to 210 by 297 in mm (209.90x297.04 at 72ppi).
- Center cropped area.
- Save as JPG file.

Otherwise explain the steps to save it on an A4 sheet.
Why not use the JPG with only the cropped area?
... Most of the A4 canvas is empty.

Regards,
CVH

doncraig
Junior Member
Posts: 13
Joined: Wed Jun 11, 2025 3:46 pm
Location: Fife, Scotland

Re: Image Imports too large

Post by doncraig » Fri Jun 13, 2025 5:56 pm

Thanks again for all your help. I have been out to the workshop and cut a frame from 5mm ply. This is exactly the result I was hoping for. I will get back to you in the morning as I am just waiting on my carer to arrive this evening.
doncraig
IMG_0001.JPG
IMG_0001.JPG (3.29 MiB) Viewed 15693 times

doncraig
Junior Member
Posts: 13
Joined: Wed Jun 11, 2025 3:46 pm
Location: Fife, Scotland

Re: Image Imports too large

Post by doncraig » Sat Jun 14, 2025 10:55 am

In answer to your last post I can say that I will need some more time to work through the options you mention but it all seems reasonable to me and it all depends on how I receive the original drawings.
However at the moment, as you can see from my last post I have finally managed to create what I want. I will now need to write out how I managed to get there and get it saved for reference.

I understand that the A3 sheets have various shapes on them.
You then scan that with an A4 scanner, top half & bottom half.
What is the resolution or DPI of the scanner?
The scanner is an A3 scanner and I can scan at 300,200 96, DPI and also Auto.

I would use the scanned input directly and trace each shape of that.
The larger and more detailed (e.g. 600dpi) an image is to trace .. The better the trace will be in vectors.
Vector art can be scaled to any size without loosing data or accuracy (almost).
I can get some drawings digitally that need to be enlarged to the correct size i.e the sheet has a bar at the top that needs to be enlarged to the size indicated e.g. the last drawings I bought were on two pages and had a bar at the top that needed to be 130mm long. put the drawings on a pendrive and took them to the local print shop who printed the two sheets beautifully. I take these pages home and scan them A3 and it takes around 14 sheets to get all the pieces saved. This I now know is a total waste of paper as I could (and should) have saved them straight to computer.

I am happy for the moment and thank you again but no doubt I will be back with more problems.
doncraig
EDIT Is there a way to put a signature at the bottom of my post with my OS and Qcad version ?

Post Reply

Return to “QCAD 'How Do I' Questions”