3.27.9 question about (images relative path) 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
User avatar
bambuko
Senior Member
Posts: 126
Joined: Fri Jul 02, 2021 6:20 pm
Location: UK, England, North Devon

3.27.9 question about (images relative path) solved

Post by bambuko » Fri Jan 20, 2023 6:10 pm

latest release includes the following (for Pro version):
Images:
Allow storing relative paths for images in DXF/DWG
I am somewhat confused...
does it "allow storing"??
or does it convert everything to "relative path"??

I have project folders with included images and until now, it was a simple matter to copy the folder, give it new name and everything remained contained in this folder (including the images).

Now, when I copy project folder, images in OCAD file have a path to original folder rather than a new folder.

On one hand I always wanted this as an option, but I am confused by this implementation :oops:
Can someone, please explain (or point to the explanation).

PS also - it seems to have happened before 3.27.9 ?? because I discovered this behaviour in 3.27.8??

Code: Select all

Version: 3.27.8.0 (3.27.8)
Internet: QCAD.org
Build Date: Oct 6 2022
Revision: dea3962
Qt Version: 5.8.0
Architecture: x86_64
Compiler: gcc 4.8.1
Last edited by bambuko on Sun Jan 22, 2023 2:59 pm, edited 1 time in total.
QCad Pro
Linux MX-21.3 "Wildflower"

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

Re: 3.27.9 question about (images relative path)

Post by andrew » Fri Jan 20, 2023 8:46 pm

bambuko wrote:
Fri Jan 20, 2023 6:10 pm
does it "allow storing"??
or does it convert everything to "relative path"??
It allows for relative paths to be stored in DXF/DWG rather than always storing the absolute path (QCAD <= 3.27.8).

If you change the path of an image to a relative path using the property editor, QCAD will leave it at exactly what you entered.
bambuko wrote:
Fri Jan 20, 2023 6:10 pm
I have project folders with included images and until now, it was a simple matter to copy the folder, give it new name and everything remained contained in this folder (including the images).
QCAD looks up images from the absolute (or relative) path as stored in the DXF. If the image is not found there, it resorts to the same folder where the DXF is stored. So the path stored in the DXF is always preferred but the same folder as the DXF always works. This is not something that has changed but might be something you had not previously noticed. If you copy a project folder, this does not automatically change any paths in the DXF (QCAD is not even involved at all in this operation as you are using a file manager to copy the folder).

The new thing is that you can manually adjust the path in the property editor, for example from /path/to/image/file.png (absolute) to image/file.png (relative). So your project folder might contain subfolders and you can still copy or move it around without breaking image paths.

User avatar
bambuko
Senior Member
Posts: 126
Joined: Fri Jul 02, 2021 6:20 pm
Location: UK, England, North Devon

Re: 3.27.9 question about (images relative path)

Post by bambuko » Fri Jan 20, 2023 9:17 pm

I will experiment, thank you for the explanation!

It is a bit confusing at the moment e_confused
QCad Pro
Linux MX-21.3 "Wildflower"

User avatar
bambuko
Senior Member
Posts: 126
Joined: Fri Jul 02, 2021 6:20 pm
Location: UK, England, North Devon

Re: 3.27.9 question about (images relative path)

Post by bambuko » Sat Jan 21, 2023 10:05 am

I have attached a zipped folder with a scenario that causes me concern.

I have original folder "test_v00"
It has .dxf file and .jpg inserted in it.

I now create a copy of this folder "test_v00 (copy)"
In my work I would rename it test_v01 and continue working on it, but I left it here as (copy) to keep it clear.
If I now modify .jpg (have a look at it - it is modified :mrgreen: ) it doesn't show in .dxf
image inserted still points to original folder :? rather than looking up at absolute/local in the first place....

I know now that I can modify path in image property (very welcome improvement),
but.... managing project folder (consisting of .dxf plus all inserted images) causes me concern.
I guess it was all fine until I started messing up with modifying the inserted images (I blame gimp :wink: )

perhaps toggle switch (in preferences?)
to switch between absolute (i.e. just image name) and relative (i.e. image name with path) ???
Attachments
QCAD_test.zip
(152.34 KiB) Downloaded 175 times
QCad Pro
Linux MX-21.3 "Wildflower"

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

Re: 3.27.9 question about (images relative path)

Post by CVH » Sat Jan 21, 2023 12:38 pm

bambuko,

First of all:
When I modify a picture for some reason I store it renamed.
Mainly because several pictures called 'pic1.png' don't tell me anything.
'pic1-cropped.png' for including in QCAD or 'pic1-lowRes.png' for display/forum purpose do ...
... And the relation with the original 'pic1.png' is quite clear.

Same goes for dxf files ... 'drawing1-v2.dxf' tells me that it is version two of 'drawing1', and/or the successor.
'drawing1-final.dxf' will tell me that it is the final version, even several years later. :wink:

In your example the folder differentiates between original and copies.
QCAD is not aware of the intended difference between 'image_a.jpg' in the original folder and 'image_a.jpg' in the new copy.

Like said by Andrew, it will revert to the drawing path when not found in the stored path.
But in your case it does exist in the stored path with the exact same name and QCAD will not revert to the drawing path.

The solution for you is storing a relative path ... The dxf file path or only the file name.
QCAD will then only look for it in the drawing path.
But you will still have several different pictures (and drawings) with the same name ... :roll:

Regards,
CVH

User avatar
bambuko
Senior Member
Posts: 126
Joined: Fri Jul 02, 2021 6:20 pm
Location: UK, England, North Devon

Re: 3.27.9 question about (images relative path)

Post by bambuko » Sat Jan 21, 2023 1:07 pm

As far as I am concerned, because QCAD does not store inserted image as part of .dxf file,
the only way to keep things safe and sensible for future is to have a "container" containing both .dxf and images used inside of it.

For me this container is simply a "folder" (or whatever it is called on either Win PC or MAC).
This folder controls versions and revisions etc. (NOT the .dxf and .jpg inside)

Absolute path for inserted .jpg makes it safe and possible.
Relative path for inserted .jpg creates confusion because my new/revised folder refers to images in the different/older folder.

You and I have different ways of working.
Yours works for you, mine works for me :lol:

I just wish that there was both absolute and relative path for image available for QCAD...

Having said al this, let me repeat - I am delighted with the recent improvement that allows me to control image path in the image properties.
QCad Pro
Linux MX-21.3 "Wildflower"

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

Re: 3.27.9 question about (images relative path)

Post by CVH » Sun Jan 22, 2023 12:04 pm

bambuko wrote:
Sat Jan 21, 2023 1:07 pm
As far as I am concerned, because QCAD does not store inserted image as part of .dxf file,
Please read about the pro and cons with embedding a picture file:

https://autocadtips1.com/2013/02/22/emb ... reference/
No manipulation like rotating, scaling, cropping ...
Huge dwg/dxf file sizes because of the BMP format.
Max picture file size.
Display quality.
...

https://knowledge.autodesk.com/support/ ... -file.html
Environment: Microsoft Windows
bambuko wrote:
Sat Jan 21, 2023 1:07 pm
You and I have different ways of working.
Agreed, we all have our habits, mine is based on that the end of paths are truncated in the path column in windows explorer when searching.
On the other hand, I do not copy complete project 'containers' but I may save the files in a new location with a new name and then take it from there.
bambuko wrote:
Sat Jan 21, 2023 1:07 pm
I just wish that there was both absolute and relative path for image available for QCAD...
From my point of view all the above is now possible.
Absolute paths and reverting to drawing path was the former art ... Now relative paths are added.
But absolute and relative don't mix and it won't solve the duplicate naming ... :wink:

Regards,
CVH

User avatar
bambuko
Senior Member
Posts: 126
Joined: Fri Jul 02, 2021 6:20 pm
Location: UK, England, North Devon

Re: 3.27.9 question about (images relative path)

Post by bambuko » Sun Jan 22, 2023 1:33 pm

Thank you,
I am well aware of pros and cons of embedded ve linked images :wink:
I do not use .bmp precisely because of file size.
.jpg is perfectly adequate for my purposes

I don't really want embedded images, because of many advantages offered by linking.

I didn't think that "paste special" was available in QCAD? (hence I am puzzled by your links to Autocad?)
CVH wrote:
Sun Jan 22, 2023 12:04 pm
...Absolute paths and reverting to drawing path was the former art ...
No, it's still the current behaviour.
If QCAD cannot find the image where it is supposed to be located (as per image properties) it will look up where the .dxf is stored.
The only thing that has changed, is that now you can edit the path in image property editor.
see:
andrew wrote:
Fri Jan 20, 2023 8:46 pm
QCAD looks up images from the absolute (or relative) path as stored in the DXF. If the image is not found there, it resorts to the same folder where the DXF is stored....
What I am after is that simple:
Screenshot from 2023-01-22 12.30.00.jpeg
Screenshot from 2023-01-22 12.30.00.jpeg (28.51 KiB) Viewed 3174 times
You will see here just file name and NO path.
I had some difficulty previously modifying image property to remove the path - will need to do more experimenting to understand this behaviour.

later edit:
it seems to be working OK now. Maybe it was something to do with frozen layers not saving my changes correctly?
or... maybe it is because now I have updated from 3.27.8 to 3.27.9 ???
all previous tests have been done with 3.27.8
sorry if it is me being stupid
e_surprised :D :mrgreen:
QCad Pro
Linux MX-21.3 "Wildflower"

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

Re: 3.27.9 question about (images relative path) solved

Post by CVH » Sun Jan 22, 2023 8:03 pm

bambuko wrote:
Sat Jan 21, 2023 1:07 pm
because QCAD does not store inserted image as part of .dxf file,
Indeed, QCAD does not, I didn't said otherwise and I don't see that as a disadvantage.

Under ACAD they can store bitmaps in a dwg/dxf but the biggest downside I see is the used BMP format.
All in the provided links: A 659KB picture in a 160KB drawing returns a 5.7MB file.
bambuko wrote:
Sun Jan 22, 2023 1:33 pm
I do not use .bmp precisely because of file size.
In the above case I suspect the 659KB picture is of a compressed format type like jpg. :roll:

Concerning 'Screenshot from 2023-01-22 12.30.00.jpeg'
CVH wrote:
Sat Jan 21, 2023 12:38 pm
The solution for you is storing a relative path ... The dxf file path or only the file name.
QCAD will then only look for it in the drawing path.
All seems to be fine now and I hope your confusing is solved too. :wink:


Time for a little tool that removes the absolute path of bitmap entities? :P

Regards,
CVH

User avatar
bambuko
Senior Member
Posts: 126
Joined: Fri Jul 02, 2021 6:20 pm
Location: UK, England, North Devon

Re: 3.27.9 question about (images relative path) solved

Post by bambuko » Sun Jan 22, 2023 8:38 pm

Thank you,
Sometimes it's good to compare the notes :mrgreen:
QCad Pro
Linux MX-21.3 "Wildflower"

Post Reply

Return to “QCAD 'How Do I' Questions”