Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 14
Posts: 14   Pages: 2   [ 1 2 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 238 times and has 13 replies Next Thread
flip3
Newbie



Switzerland
Joined: May 6, 2024
Post Count: 10
Status: Offline
Reply to this Post  Reply with Quote 
Wall pattern disappears in SVG when embedded in website

When I embed a SVG file which I exported from Sweet Home 3D (Plan > Export to SVG format) into a website, the wall pattern disappears. Anyone has the same issue and eventually a solution?

Image opened locally:


Image embedded in website:


Thanks,

Philip
[May 7, 2024, 5:01:08 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
flip3
Newbie



Switzerland
Joined: May 6, 2024
Post Count: 10
Status: Offline
Reply to this Post  Reply with Quote 
Re: Wall pattern disappears in SVG when embedded in website

I add the links since it didn't work to embed images from DropBox in the thread:

Image opened locally
Image embedded in website
[May 7, 2024, 5:03:38 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Daniels118
Advanced Member
Member's Avatar

Italy
Joined: Nov 17, 2021
Post Count: 412
Status: Offline
Reply to this Post  Reply with Quote 
Re: Wall pattern disappears in SVG when embedded in website

Can you share the svg file and the html code used to embed it into the web page?
[May 7, 2024, 5:31:44 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
flip3
Newbie



Switzerland
Joined: May 6, 2024
Post Count: 10
Status: Offline
Reply to this Post  Reply with Quote 
Re: Wall pattern disappears in SVG when embedded in website

Yes, sure. This is the SVG file.

... and my code is quite simple:
<div class="floor-plans">
<img src="/assets/photos/s001-lu/layout/Grundriss_S001-LU.svg" alt="">
</div>


... and some CSS applied to the image:
.floor-plans img {
width: 100%;
height: 100%;
max-height: 500px;
}

[May 7, 2024, 7:39:17 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
flip3
Newbie



Switzerland
Joined: May 6, 2024
Post Count: 10
Status: Offline
Reply to this Post  Reply with Quote 
Re: Wall pattern disappears in SVG when embedded in website

You can also check out the live result on this page when you scroll a bit down to "Grundskizze.
[May 7, 2024, 7:40:51 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9214
Status: Offline
Reply to this Post  Reply with Quote 
Re: Wall pattern disappears in SVG when embedded in website

It’s really strange because when viewed on Dropbox web site, the SVG image looks correct!
Could a CSS style alter a SVG image?
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[May 7, 2024, 8:30:02 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
sjb007
Advanced Member




Joined: May 18, 2021
Post Count: 224
Status: Offline
Reply to this Post  Reply with Quote 
Re: Wall pattern disappears in SVG when embedded in website

flip3. The link to the SVG file is on dropbox. Dropbox appears to be delivering a png on the dropbox page. It must be rendering the svg to png for some daft reason. I can't download the actual svg file unless I register an account with dropbox. No thanks.
My intent was to compare the SVG, but that is not currently possible.

What I can tell you is that the svg file on your lagerraum web page does not contain the necessary embedded image data (base64 encoded) for the hatching pattern. When you export from SH3D it encodes the pattern as a single large encoded image. This is missing in the server delivered file. So either you have modified the file after export, (i.e. you used Inkscape to remove the compass) or your server is messing with the file. I'm going to hazard a guess that the rental site is processing svg for some reason, and the image is lost.
[May 8, 2024, 12:56:57 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
flip3
Newbie



Switzerland
Joined: May 6, 2024
Post Count: 10
Status: Offline
Reply to this Post  Reply with Quote 
Re: Wall pattern disappears in SVG when embedded in website

Yes, you seem to be right. The CMS must have done a conversion to the image. The file I uploaded was 1.2MB. When I download it from the website, it is just 34kb. So, somewhere in between the data has been removed / lost. I will investigate this but many thanks for your "outside view".
[May 8, 2024, 8:11:18 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Keet
Advanced Member
Member's Avatar

Netherlands
Joined: Apr 8, 2022
Post Count: 817
Status: Offline
Reply to this Post  Reply with Quote 
Re: Wall pattern disappears in SVG when embedded in website

Yes, you seem to be right. The CMS must have done a conversion to the image. The file I uploaded was 1.2MB. When I download it from the website, it is just 34kb. So, somewhere in between the data has been removed / lost. I will investigate this but many thanks for your "outside view".
Be glad the CMS converted the image. 1.2MB is way to big to use on a website. Imagine you have 3 or 4 of those images on a page. It would take ages to load on slower connections, not to mention the impact on data limits some providers have.
As you can see the quality of the 34kB image as displayed is fine, there's really no need for a huge image of 1.2MB. If you want users to be able to save the image in the original svg format make it a separate download.

To solve your problem create a much smaller png from the svg image and use that on the site.
[May 8, 2024, 8:39:11 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
flip3
Newbie



Switzerland
Joined: May 6, 2024
Post Count: 10
Status: Offline
Reply to this Post  Reply with Quote 
Re: Wall pattern disappears in SVG when embedded in website

Yes, I know. I just didn't figure out how to compress the file properly and I prefer to use SVG. I tried with Inkscape but afterwards the file wasn't readable. I will find a solution ;-)
[May 8, 2024, 9:32:31 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 14   Pages: 2   [ 1 2 | Next Page ]
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

    Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads
   
© Copyright 2006-2024 eTeks - All rights reserved