Jump to content
You must now use your email address to sign in [click for more info] ×

SVG Export - The output is a black box


Recommended Posts

Hey,

Hopefully someone can get a hold of this.  I've use Affinity for a while now, but suddenly when I export SVG, I get a "black box" as file.  Then if you open that svg file in Designer, there's nothing there.  But the layer shoes the object, its really weird.  I must be doing something wrong. 

Has anyone had this happen??  I'm confused and need to fix this pretty quickly with a deadline approaching.  I've attached the files.

nike-shoe.afdesign

nike-shoe.svg

**Update -

I just tried it with basic shapes and it works.  It must be something with the photo.  I did remove it from it's background using polygon lasso.  Maybe that has something to do with it.  I also tried to export to SVG in Photo and got the same black box.  I guess full color photos with background remove has an issue.  But it doesn't make sense yet... hmm I'll keep trying until you guys respond.

Link to comment
Share on other sites

Yeah bud, it's still just showing a black box as the file.  But when I export PNG it shows fine.  Here's a screenshot and I added the files again.  I understand the exporting options, dialogue and such.  I'm just not understanding why my file explorer is showing black box, and why it's showing a blank image in Designer.

Maybe someone can contact me for a screenshare (123rescue) or something because you should see my drive - or something.  This is soooo weird.  And when I use a shape or something simple it exports to SVG fine

844.afdesign

844.png

844.svg

844-shape.svg

844-shape-1.svg

Link to comment
Share on other sites

As for your “Nike Shoe” file, the problem is that the image data do not get embedded in the SVG code. Unfortunately, I cannot reproduce the problem here, so it’s very difficult to guess what’s going wrong. :(

Export-Difference.thumb.png.b6f16af6770f0484251cf620a7fe07f7.png

 

Have you tried exporting from the Export Persona? Have you played around with the various options here? You can make layers available for export, and disable others. Do you see any difference? :/

Export-Persona-A.png.22448b33deea5017e76c02fbf1a9bcfa.png  Export-Persona-B.png.c351a52369921984057cad79b17c374f.png

 

Link to comment
Share on other sites

Another idea. You could export your entire image to PNG. Then erase all layers from your document and use File > Place … to import your PNG as an image layer. Now export to SVG. Does that make any difference? :/

This is the .afdesign file with the PNG placed as an image:

nike-shoe.afdesign

This is the exported .png file:

nike-shoe.thumb.png.6e50f94cbc72b53a8a39bf81ab27ab93.png

This is the .svg output on my machine:

nike-shoe.svg

I am sorry this is just guesswork. :(

Link to comment
Share on other sites

Hmm. So maybe this is a Windows-related bug. I am sorry that all my suggestions were useless. As I said, I cannot reproduce this problem on the Mac, and I don’t know what could be the root of the issue. :(

Maybe you could try to export to a different file format and use another application to do the conversion to SVG. I don’t know.

Link to comment
Share on other sites

Yeah that's right!  In Explorer its a black box, but in Notepad the code is there.  In Chrome it shows the photo.  In DrawPlus it shows. But when I export it, then try to reopen the black box file in Affinity I get a black transparent canvas!!

I normally use Desiger to open SVG's or sometime Windows Photo.  Sometimes Chrome, depending if I plan to work on it, or just view it.

** AND

I think something is wrong with the DOTZ svg viewer I user.  Which one do you use?  I just deleted it, and changed DPlus to the extension, then I changed it back to Designer as the svg extension. 

Maybe its that viewer that's showing the black box.  I just opened all the files again in DP & Designer and now they show objects, except 1 didn't... hmm man this is freaking strange.  I've never had this happen.

Link to comment
Share on other sites

hmmm.. you think its related to exporting svg on windows??? That makes more sense to me.  Can you relay this to dev team?  Man I'm stuck then... pngs don't scale well on a dynamic site.  I'm building a project in Webflow with all kinds of interactions and animation.  Plus there's cards that need flexible vectors.  Dang I HATE to go back to Photoshop...grrrr its expensive.  But man if Ezra can't figure this one out its gonna be a mass-exodus I promise.  They need to look at this seriously, all developers are going to be using svg.  I don't know what to do now.

Link to comment
Share on other sites

I just took the .afdesign file from the first post in this thread, exported it as a .svg file on Windows using both Affinity Designer 1.6.4.104 and beta 1.6.5.119, and the export worked just fine for me in each case.

So I do not think it is necessarily a bug for Affinity Designer on Windows, or at least not one that recreates reliably. Sorry.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

Well, I viewed my exported file in Designer (which I understood didn't work for you), and in Firefox.

But just now I opened it in Paint Shop Pro and in Inkscape.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

Ah. Sorry. I totally misunderstood.

Explorer shows me the Affinity Designer icon. I do have the FastPictureViewer codec pack installed, so I would have expected a meaningful thumbnail.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

Oh okay no prob.  So does your thumbnails show the file in explorer?  I'm using Dotz from Google, but it stopped working I guess.  I can't find any other thing to install that will show svg's in explorer as a thumbnail.  Of course, if I change the file association for Affinity, it does show the Designer icon, but I don't get a thumbnail to view, only an icon.

This code used to work too!  Do know of any other script to view svg thumbnails?

Link to comment
Share on other sites

Have you seen this program: https://www.mysticcoder.net/MysticThumbs.html

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

LORD JESUS HALLELUYAAAAAAAA.... OMG!  I just downloaded the trial for mystic... and I saw it in my search yesterday but didn't think to try the trial.  I think I'm gonna have to buy the license.  And email the dang developer and tell him how cool this script is.  I can't believe I've wasted you guys' time on this.  I spent 3 full days dude... ridiculous huh?  I've working on an important style guide and I had to get all these font icons and vectors in prototype.

Thanks for all your help, it's fixed for now, check out the image.

thumbnail-preview.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.