Retrieving bitmaps (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.

Graham
Full Member
Posts: 56
Joined: Wed Dec 11, 2019 2:17 pm

Retrieving bitmaps (SOLVED)

Post by Graham » Sun Feb 19, 2023 11:28 am

Hi everyone
From my earlier posts.
I have approx, 180 bitmaps imported into a drawing, rescaled and traced.
I inadvertently moved the the original bitmap folder to a new folder and the images no longer show in the QCAD drawing.
I moved the folder back but they still do not show.
Is there an easy way to restore them.?

Graham

WIN 11
LATEST QCAD PRO
Last edited by Graham on Tue Feb 21, 2023 8:34 pm, edited 1 time in total.

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

Re: RETREIVING BITMAPS

Post by CVH » Sun Feb 19, 2023 3:13 pm

Graham,
Graham wrote:
Sun Feb 19, 2023 11:28 am
I moved the folder back but they still do not show.
The bitmap files are addressed when you insert them or when you load the drawing.
Meaning that they stay visual in your drawing as long as it is open, even when you change the bitmaps their location.
Also meaning that they seems to disappear when you re-open the drawing file after you moved the sources.
Also meaning that they should re-appear after you moved the sources back in and then re-open the drawing file.

You need to make sure that they are back in the same path as before.
The original path is still stored in the drawing file.

Another solution is to include them in the folder where the drawing file is stored.
QCAD will always revert to the drawing file path when the bitmaps are not found in the initially stored path.

Regards,
CVH

Graham
Full Member
Posts: 56
Joined: Wed Dec 11, 2019 2:17 pm

Re: Retrieving bitmaps

Post by Graham » Mon Feb 20, 2023 12:39 pm

Hi CVH
The original path is still stored in the drawing file
Were will I find this
Graham

Graham
Full Member
Posts: 56
Joined: Wed Dec 11, 2019 2:17 pm

Re: Retrieving bitmaps

Post by Graham » Mon Feb 20, 2023 4:37 pm

I have read up and have tried the property editor but you cannot select something that is not there.
Looks like I have lost a lot of hard work.
Unless some one can suggest something else.
GRAHAM

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

Re: Retrieving bitmaps

Post by andrew » Mon Feb 20, 2023 4:57 pm

You can simply copy the DXF file and all image files all into the same folder and open the DXF file. QCAD will always find the image files if they are in the same folder as the DXF file.

Graham
Full Member
Posts: 56
Joined: Wed Dec 11, 2019 2:17 pm

Re: Retrieving bitmaps

Post by Graham » Mon Feb 20, 2023 6:45 pm

Sorry Andrew
Copied all images to same folder as dxf folder.
Still the same.
Layers for images are shown in the layer list but no images.
Have turned the draft mode on/off no change as I was caught out with that once.
Graham

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

Re: Retrieving bitmaps

Post by CVH » Mon Feb 20, 2023 7:25 pm

CVH wrote:
Sun Feb 19, 2023 3:13 pm
The original path is still stored in the drawing file.
Remark that you have to re-load the dxf file.
Graham wrote:
Mon Feb 20, 2023 4:37 pm
I have read up and have tried the property editor but you cannot select something that is not there.
Try:
Activate the Selection Filter (GF).
Entity type: Image.
Then hit the button 'Replace current Selection'.

This will select all bitmap images.

Because QCAD can not locate them the size will be zero.
All four corners their reference points will be at the insertion point.

Now only select one of those selected in group.
The expected path should then be displayed in the Property Editor.
Graham wrote:
Mon Feb 20, 2023 6:45 pm
Sorry Andrew
Copied all images to same folder as dxf folder.
Still the same.
That makes me worry ... Could you share an as original possible dxf file?

Regards,
CVH

Graham
Full Member
Posts: 56
Joined: Wed Dec 11, 2019 2:17 pm

Re: Retrieving bitmaps

Post by Graham » Mon Feb 20, 2023 8:20 pm

Andrew
(A) You may recall I copied the images into QCAD scaled them to drg sizes then dimensioned and traced them
(B) I saved that file then reopened it and changed the scale to what I work in.
(C) That file was then saved to a different name.
(D) have dropped the first file (A) into the image file folder as well and that shows the images.(IT DID BEFORE)
(E)I then B AND C again.
So I now have 3 drgs
A-SHOWS THE IMAGES
E-SHOWS THE IMAGES
C-DOES NOT
So now I am back where I want to be but do not know how the original query happened.
Rather convoluted way round my problem
Graham

Graham
Full Member
Posts: 56
Joined: Wed Dec 11, 2019 2:17 pm

Re: Retrieving bitmaps

Post by Graham » Mon Feb 20, 2023 8:24 pm

AS REQUESTED
Graham
Attachments
1.5 to the foot R&M LATEST.dxf
(4.83 MiB) Downloaded 623 times

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

Re: Retrieving bitmaps

Post by CVH » Mon Feb 20, 2023 8:48 pm

Graham,

Reading textual in the dxf I find:
96 type png ... Expected location C:/Users/GRAYH/Desktop/RM DRG SCANS/
2x hopper.png ... Expected location C:/Users/GRAYH/Desktop/RANSOME & MARLES/
Untitled.png ... Expected location C:/Users/GRAYH/Desktop/RANSOME & MARLES/
2 type tiff ... Expected location C:/Users/GRAYH/Desktop/RM DRG SCANS/
270 type jpeg ... Expected location C:/Users/GRAYH/Desktop/RM DRG SCANS/

Total: 371 bitmaps ... QCAD reports 369 image entities

Regards,
CVH

Graham
Full Member
Posts: 56
Joined: Wed Dec 11, 2019 2:17 pm

Re: Retrieving bitmaps

Post by Graham » Mon Feb 20, 2023 9:27 pm

CVH
I am in hospital tomorrow to have electric shock treatment to correct irregular irregular heart beat. I will check all the file locations
when I am discharged.
I presume you cannot see the images without the appropriate files?
Graham

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 5060
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Retrieving bitmaps

Post by Husky » Mon Feb 20, 2023 11:46 pm

Hi Graham,
Graham wrote:
Mon Feb 20, 2023 8:20 pm
(B) I saved that file then reopened it and changed the scale to what I work in.
(C) That file was then saved to a different name.
I don't know why but something makes no sense at all regarding the images scales.
The images are there but not one image has a width more than 1.0e-323 (as Scientific Notation). That is 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001units. e_surprised e_surprised e_surprised

Husky_2023_02_20-01.png
Husky_2023_02_20-01.png (4.9 KiB) Viewed 11772 times

Try this approach with the provided example drawing:
make sure the bitmaps are still in the correct folder (C:/Users/GRAYH/Desktop/RM DRG SCANS), (C:/Users/GRAYH/Desktop/RANSOME & MARLES/),
load the dxf file,
use the selection filter to find and select all images,
use the Property Editor to change the setting for "Width and Height Factor from *VARIES* to 1,
I expect that the images will show up again but most likely all your scale settings are lost and have to be redone.

Graham wrote:
Mon Feb 20, 2023 9:27 pm
I am in hospital tomorrow to have electric shock treatment to correct irregular irregular heart beat. I will check all the file locations
when I am discharged.
Take your time. Life and health is more important than any drawing on earth! Take care! :wink:
Work smart, not hard: QCad Pro
QcadPro, QcadCam, Win11/64, 64GB RAM, 10-Core, SSD
If a thread is considered as "solved" pls. change the title of the 1. post to "[solved] Title..."

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

Re: Retrieving bitmaps

Post by CVH » Tue Feb 21, 2023 8:41 am

Husky wrote:
Mon Feb 20, 2023 11:46 pm
I don't know why but something makes no sense at all regarding the images scales.
There is definitely something wrong with the scale factors in the provided file.
Another question would be why they are all inserted at position (0,0). :?

But maybe these are just artifacts.
Given Huskey's example but literal from the dxf:
The file C:/Users/GRAYH/Desktop/RM DRG SCANS/5.2.png
- Is inserted at (1700, 2338)
- Pixel scales are twice 0.000588235294117647
So these values are not stored as zeros or as almost nothing.
Graham wrote:
Mon Feb 20, 2023 9:27 pm
I presume you cannot see the images without the appropriate files?
Indeed. Even the path C:/Users/GRAYH/Desktop/ doesn't exist here for obvious reasons.
QCAD can't retrieve size information but then again any size times nothing or almost nothing would always be nothing.
Graham wrote:
Mon Feb 20, 2023 8:20 pm
(A) You may recall I copied the images into QCAD scaled them to drg sizes then dimensioned and traced them
One does not copy an image into a dxf file, one inserts a link.

Regards,
CVH

Graham
Full Member
Posts: 56
Joined: Wed Dec 11, 2019 2:17 pm

Re: Retrieving bitmaps

Post by Graham » Tue Feb 21, 2023 6:07 pm

Hi All
I am well and back to a regular heart beat.
As I said I have managed to get all the info back but now on 3 drgs though.
Some answers to your questions.
The scale factors were originally right'
The scale factor was .0037425 from scanned image to final size
They were not all on 0,0
Attached is a screen shot of most of the drg with images at my working scale

Its a pity you cannot sever a link on an image/images and retain it permanently on the drg. so it can be treated like all other lines/circles etc.
Graham
Attachments
SCREEN SHOT 1.png
SCREEN SHOT 1.png (263.72 KiB) Viewed 11650 times

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

Re: Retrieving bitmaps

Post by CVH » Tue Feb 21, 2023 7:45 pm

Graham wrote:
Tue Feb 21, 2023 6:07 pm
I am well and back to a regular heart beat.
Nice to hear that.
Graham wrote:
Tue Feb 21, 2023 6:07 pm
Attached is a screen shot of most of the drg with images at my working scale
Merging things from a few drawing files together should not be an issue. :wink:
Graham wrote:
Tue Feb 21, 2023 6:07 pm
They were not all on 0,0
Probably not, and so does it seem if we look in the file textual.
But with your file and without the images and if we select all 369 images then they are all at (0,0)
And that is kind of strange as I can not replicate that.
Nor can I replicate the absurd small scale reported by Husky.
When I fiddle with bitmap paths, they may disappear but the insertion point and the scales remain.
Graham wrote:
Tue Feb 21, 2023 6:07 pm
Its a pity you cannot sever a link on an image/images and retain it permanently on the drg. so it can be treated like all other lines/circles etc.
Bitmaps are not stored in the dxf file and for good reasons.
https://www.qcad.org/rsforum/viewtopic. ... 689#p39689


If considered solved please add [Solved] to the initial post title by editing the post.

Regards,
CVH

Post Reply

Return to “QCAD 'How Do I' Questions”