inserted bitmaps, when switching between Linux and Windows 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.

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

inserted bitmaps, when switching between Linux and Windows SOLVED

Post by bambuko » Sat Jul 03, 2021 2:20 pm

I am just getting used to freshly purchased Pro version:

Code: Select all

QCAD version: 3.26.4.0
Qt version: 5.14.2
Compiler version: gcc 5.4.0
Build date: Jun  4 2021
Revision: 0bb4334f11f4340e470c4135ae61c076a98f919f
I am using it on either on:
elementary OS or Windows 10 Pro

Everything works fine (so far :) ) apart from an issue with inserted bitmaps when switching between Windows and Linux.
I can open a file either in Windows or Linux and the cad model in itself is fine, but "inserted" images loose the plot between two operating systems :oops:

The link path (for exactly the same image) is different for Windows and Linux,
so file saved in Windows opens fine in Linux apart from the missing image and vice verse.

All my data is on NAS, accessible from any operating system or location, but the way image's path is saved in QCAD seem to cause problem when switching between Linux and Windows.

Is there a way out of this problem, please?
One solution would be if the bitmap was "properly inserted/embedded" in QCAD file, instead of being just "linked to", but is it possible?
Last edited by bambuko on Sun Sep 19, 2021 10:03 am, edited 1 time in total.
QCad Pro
Linux MX-21.3 "Wildflower"

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

Re: inserted bitmaps, when switching between Linux and Windows

Post by Husky » Sat Jul 03, 2021 6:53 pm

Hi,
bambuko wrote:
Sat Jul 03, 2021 2:20 pm
One solution would be if the bitmap was "properly inserted/embedded" in QCAD file, instead of being just "linked to", but is it possible?
No, not with the current QCAD version.
bambuko wrote:
Sat Jul 03, 2021 2:20 pm
Is there a way out of this problem, please?
Yes.
Note: When QCAD tries to open the bitmap, which is linked in the drawing, QCAD will look FIRST for the bitmap in the folder where the drawing was stored regardless the link.
With other words: If the drawing and the bitmap is stored in the same folder it should load in Windows or Linux despite the different link path ...
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

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

Re: inserted bitmaps, when switching between Linux and Windows

Post by bambuko » Sat Jul 03, 2021 8:28 pm

Husky wrote:
Sat Jul 03, 2021 6:53 pm
... it should load in Windows or Linux despite the different link path ...
Thank you,
Yes, it is exactly the same bitmap in exactly the same location.
I agree, it should, but it doesn't load, hence my question.
Image file is stored on NAS which is equally accesible from either Win or Linux.
I am away from my PC at the moment, but I will share path details and how it is saved in QCAD file later.
QCad Pro
Linux MX-21.3 "Wildflower"

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

Re: inserted bitmaps, when switching between Linux and Windows

Post by bambuko » Sun Jul 04, 2021 9:28 am

OK, I did a bit more experimenting, and:

When I insert image/bitmap in Linux, the path looks like this:

Code: Select all

/media/synologymount/QCAD_layout/side view.png
When I insert image/bitmap in Windows, the path looks like this (where Z is synology drive, same as above):

Code: Select all

Z:\QCAD_layout\side view.png
File created in Linux opens fine in Windows and inserted images are OK (but if I save it in Windows, it will only work in Windows - see below)

File created/saved in Windows is not OK in Linux - inserted bitmap is missing.

As you say, it should work OK, but it is not.
Something is wrong there...
Last edited by bambuko on Sun Jul 04, 2021 12:17 pm, edited 1 time in total.
QCad Pro
Linux MX-21.3 "Wildflower"

User avatar
petevick
Premier Member
Posts: 392
Joined: Tue May 19, 2020 9:34 am
Location: North Norfolk coast UK

Re: inserted bitmaps, when switching between Linux and Windows

Post by petevick » Sun Jul 04, 2021 12:08 pm

might this be a problem with the path separator for Linux and Windows, ie, Linux uses / and Windows uses \
Pete Vickerstaff
Linux Mint 21.2 Cinnamon, Qcad Pro 3.29.6

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

Re: inserted bitmaps, when switching between Linux and Windows

Post by bambuko » Sun Jul 04, 2021 12:32 pm

petevick wrote:
Sun Jul 04, 2021 12:08 pm
...path separator ...
Don't know, but...
if this was the case it would be a problem both ways (i.e. from Linux to Windows as well as from Linux to Windows) wouldn't it?
and yet, as mentioned before - it works fine when I open in Windows a file created in Linux.
It is only when I try to open in Linux a file created in Windows that the inserted image just dissapears :oops:

despite:
Husky wrote:
Sat Jul 03, 2021 6:53 pm
...it should load in Windows or Linux despite the different link path ...
It will take someone more knowledgeable than myself to solve this one... :wink:

P.S.
Husky wrote:
Sat Jul 03, 2021 6:53 pm
bambuko wrote:
Sat Jul 03, 2021 2:20 pm
One solution would be if the bitmap was "properly inserted/embedded" in QCAD file, instead of being just "linked to", but is it possible?
No, not with the current QCAD version...
Does this mean that there is some future version where this might happen?
QCad Pro
Linux MX-21.3 "Wildflower"

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

Re: inserted bitmaps, when switching between Linux and Windows

Post by Husky » Sun Jul 04, 2021 5:27 pm

bambuko wrote:
Sun Jul 04, 2021 9:28 am
OK, I did a bit more experimenting, and:

When I insert image/bitmap in Linux, the path looks like this:

Code: Select all

/media/synologymount/QCAD_layout/side view.png
When I insert image/bitmap in Windows, the path looks like this (where Z is synology drive, same as above):

Code: Select all

Z:\QCAD_layout\side view.png
How does the path to the drawing looks like in Windows / Linux
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

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

Re: inserted bitmaps, when switching between Linux and Windows

Post by bambuko » Sun Jul 04, 2021 6:09 pm

Husky wrote:
Sun Jul 04, 2021 5:27 pm
How does the path to the drawing looks like in Windows / Linux
Exacty the same, both the image/bitmap and Qcad file are in the same folder.
QCad Pro
Linux MX-21.3 "Wildflower"

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

Re: inserted bitmaps, when switching between Linux and Windows

Post by Husky » Sun Jul 04, 2021 7:59 pm

Ok .... I'm confused .... :lol: :lol: :lol:

Assuming your statement is correct that the drawing and the bitmap is in the same folder (QCAD_layout) and you can double check that this is thru with a file explorer like Windows Explorer etc. then it should work.

I tested it with windows again to be sure. Drawing in folder drawings1, bitmap in folder bitmaps1, linked in QCAD, saved in folder drawing1. Closed QCAD.
Moved bitmap from folder bitmap1 to drawings1 what means the link in the drawing is not anymore accurate.
Launched QCAD, launched drawing, bitmap is still properly loaded because it is stored in the same folder. Qcad changed even the link to the bitmap (Property Editor) in the drawing to the actual location. Everything works as expected!

I don't have Linux. Please make the same test in Linux to verify that the Linux version works as expected too. Thanks.
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

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

Re: inserted bitmaps, when switching between Linux and Windows

Post by bambuko » Sun Jul 04, 2021 9:37 pm

Husky wrote:
Sun Jul 04, 2021 7:59 pm
...Assuming your statement is correct that the drawing and the bitmap is in the same folder (QCAD_layout) ...
how can I prove to you that it is the case? e_confused
...and you can double check ...
what is there to check?
I have created a folder, I have created Qcad file and saved it in this folder, placed image file in the same folder and inserted it in Qcad file. It is all there to be seen using either File Explorer, or it's Linux equivalent.
.... then it should work...
let me try to explain again :mrgreen:
Having created this Qcad file in Linux and saved it in NAS (network attached storage) folder I can open it using either Windows or Linux PC.
Both of them open fine, but if you save this file in Windows it corrupts something and if I open it again in Linux, the inserted image is gone.
...I tested it with windows again to be sure...
You cannot test the scenario I am describing in Windows alone.
You need both Linux and Windows to test using the same file with both.
I suspect that you might not fully follow what I am talking about,
and if so, I do apologise - it is very difficult to describe something on the forum...
which would be very easy to demonstrate if you were standing next to me.
....I don't have Linux. Please make the same test in Linux to verify that the Linux version works as expected too. Thanks.
Yes Linux version works fine as well (I have said so before).
What doesn't work is is using the same Qcad file with both Windows and Linux, purely because of the problem with linked images.

Please understand that my frustration is only with my inability to explain the issue (not with you, nor with Qcad).
QCad Pro
Linux MX-21.3 "Wildflower"

User avatar
petevick
Premier Member
Posts: 392
Joined: Tue May 19, 2020 9:34 am
Location: North Norfolk coast UK

Re: inserted bitmaps, when switching between Linux and Windows

Post by petevick » Sun Jul 04, 2021 9:53 pm

bambuko, would it be possible for you to post the Qcad file and the bitmap file you are using, just for consistency, I'll then try to recreate your problem as I have both Linux and Windows. If I do recreate the problem then we know it could be a possible bug.
Pete Vickerstaff
Linux Mint 21.2 Cinnamon, Qcad Pro 3.29.6

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

Re: inserted bitmaps, when switching between Linux and Windows

Post by bambuko » Sun Jul 04, 2021 10:30 pm

Thank you very much for your kind offer.
I will send you a message with both files tomorrow (it's getting late here :) )
QCad Pro
Linux MX-21.3 "Wildflower"

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

Re: inserted bitmaps, when switching between Linux and Windows

Post by Husky » Mon Jul 05, 2021 12:17 am

bambuko wrote:
Sun Jul 04, 2021 9:37 pm
You cannot test the scenario I am describing in Windows alone.
Correct! But to narrow down the possible reason for the issue I have to make baby steps. If QCAD works as expected on a single windows installation and on a single Linux installation then I can look further how the components deal with each other in a network ...
bambuko wrote:
Sun Jul 04, 2021 9:37 pm
I suspect that you might not fully follow what I am talking about,
and if so, I do apologise - it is very difficult to describe something on the forum...
which would be very easy to demonstrate if you were standing next to me.
No need to worry about that! I think I understand what you are trying to explain and I have the feeling that you know what you are talking about. If I wouldn't believe you I wouldn't participate in this topic anymore! If I ask "stupid" question then I ask them because I think the system is doing something stupid and not the user! If it sounded differently that wasn't my intention and I apologize for that!

Ok, conclusion:
Drawing / Bitmap saved in the same folder,
QCAD Windows / Linux can find and read full content,
Saved in Windows, back to the same folder, Linux will not find the bitmap anymore - regardless the internal QCAD rule to look first in the home folder for the bitmap ...

Here is what I don't understand:
bambuko wrote:
Sun Jul 04, 2021 9:37 pm
What doesn't work is is using the same Qcad file with both Windows and Linux, purely because of the problem with linked images.
Even if something goes wrong with the link - QCAD has still to load the image first from the folder. If the image still exist (and I think so) then it should work.
Could it be that there is a folder permission issue?
bambuko wrote:
Sun Jul 04, 2021 9:37 pm

Please understand that my frustration is only with my inability to explain the issue (not with you, nor with Qcad).
We are absolute good! :wink:
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

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

Re: inserted bitmaps, when switching between Linux and Windows

Post by bambuko » Mon Jul 05, 2021 9:14 am

Husky wrote:
Mon Jul 05, 2021 12:17 am
...If QCAD works as expected on a single windows installation and on a single Linux installation...
Yes, I can confirm that QCAD works exactly as expected in Linux.
I have created new folder on usb stick (so that path to the image was no longer correct).
Modified (in properties) the path to show only the name of image file and because it was in the same folder,
QCAD has found it "automatically" and updated the path.
Husky wrote:
Mon Jul 05, 2021 12:17 am
Drawing / Bitmap saved in the same folder,
QCAD Windows / Linux can find and read full content,
Saved in Windows, back to the same folder, Linux will not find the bitmap anymore - regardless the internal QCAD rule to look first in the home folder for the bitmap ...
Yes!
You are spot on - this is exactly what I am reporting :D
I will do more experiments today and will report again in separate post.

One of the things I want to try, is to eliminate NAS as a possible source of problems (doubt it, but you never know...),
so I will try it with QCAD file and image file in a folder on usb stick.
All hardware is the same, I am just changing OS (dual boot).
Husky wrote:
Mon Jul 05, 2021 12:17 am
We are absolute good! :wink:
Thank you for your understanding!
QCad Pro
Linux MX-21.3 "Wildflower"

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

Re: inserted bitmaps, when switching between Linux and Windows

Post by bambuko » Mon Jul 05, 2021 9:46 am

OK, I can confirm that the behaviour is exactly the same when using a folder on usb stick (instead of a folder on NAS).
I have attached .zip of the folder (containing Qcad file and image file) - this was created in Linux and is perfectly viewable in both Linux and Windows10.
To replicate the issue - open attached in Windows, save Qcad file in Windows, and then try opening it again in Linux.
In my experience all is fine with exception of missing image/bitmap.
@petevic - rather than send it directly to you via PM, I have decided to attach it here, so that anyone can try.
Thank you.

Qcad_test(created_in_Linux).zip
(830.37 KiB) Downloaded 359 times
QCad Pro
Linux MX-21.3 "Wildflower"

Post Reply

Return to “QCAD 'How Do I' Questions”