1

A designer has provided an SVG file for a logo centered on a square canvas. However, when I tried to export the the file to a PNG, the following happened:

  • only the logo text itself was included, the canvas was absent
  • the background of the logo was transparent, although Inkscape showed a white (canvas) background.

How can I export the logo with the entire canvas and ensure it is white?


UPDATE:
Thanks to the answer below, I also found the background color window. It's far from clear what that means, but the trick is that on the RGB tab, you need to set the opacity, A (for Alpha) to be 100 which is quoted in [%] and not 1-255 like the other values. Or you can set the RGBA to hhhhhhff.

enter image description here

2

In Inkscape the canvas has no fill by default. The canvas is transparent despite being shown as white on-screen. You can see this transparency in Inkscape if you go into File > Document Properties and set the "Chequerboard background" option. Exporting an SVG as PNG will therefore result in areas with no objects being rendered as completely transparent.

Here's one solution:

  1. Draw a white filled rectangle that is big enough to cover all the artwork (or the entire canvas), and move it to the bottom of the object stack using the keyboard shortcut End, or do Object > Lower to bottom

  2. Select the filled shape and the artwork, then in the Export PNG Image dialog Shift+Ctrl/Command+E, choose the "Selection" tab, and hit Export.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.