How do I save a file in a format that does not have the canvas visible?

Asked by Michael Roseman

I made a graphic for an industrial touchscreen. I saved the first version as a .svg and as a .png; the touchscreen utilizes .png graphics. The first version of the .png saved without the canvas visible at all. I made a second version that looked different. I saved it the same way, as a .svg and as a .png. However, when I open the second version .png, I get the graphic and the canvas, which is not desirable at all since it will be imported into a touchscreen, and I only want the graphic itself. I did it once accidentally and can't figure out how to do it on purpose! By the way, I'm new at this.

Question information

Language:
English Edit question
Status:
Solved
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Solved by:
su_v
Solved:
Last query:
Last reply:
Revision history for this message
Best su_v (suv-lp) said :
#1

Use 'File > Export Bitmap' - this will respect the color and alpha
values for the document background as defined in the document properties
(defaults to white, fully transparent).

Do not save a copy as 'Cairo PNG' (unless you have reason to do so):
'Cairo PNG' will always export the page size, and add a solid white
background.

For details about the 'File > Export Bitmap' option, please read the
related section in the manual:
<http://tavmjong.free.fr/INKSCAPE/MANUAL/html/File-Export.html#File-Export-PNG>

(Hint: the dialog has four options at the top, to export the 'Page',
'Drawing', 'Selection' or 'Custom' area. You likely want to export the
'Drawing' area, based on your description in the question.)

Revision history for this message
Michael Roseman (mroseman) said :
#2

This works great, as long as my graphic has smooth edges. I basically have a rectangle with two small circles on the top, and it still shows white behind the circles, as if there is a canvas there. I took off the circles and it's great, but I have to build several other graphics that have other such protrusions that I can't get rid of. Maybe I did it wrong?

Revision history for this message
su_v (suv-lp) said :
#3

On 2013-02-11 21:01 +0100, Michael Roseman wrote:
> This works great, as long as my graphic has smooth edges. I basically
> have a rectangle with two small circles on the top, and it still shows
> white behind the circles, as if there is a canvas there. I took off the
> circles and it's great, but I have to build several other graphics that
> have other such protrusions that I can't get rid of. Maybe I did it
> wrong?

Do you happen to use Inkscape on a Mac, and those circles had been
created by copy&pasting existing or earlier drawn vector objects (circles)?

If this assumption is true, please read this related FAQ
<http://wiki.inkscape.org/wiki/index.php/FAQ#Copying_and_pasting_in_Inkscape_creates_pixellated_images_instead_of_copying_the_vector_objects>

and adjust the X11 preferences as shown in this screenshot:
<https://bugs.launchpad.net/inkscape/+bug/307005/+attachment/1760181/+files/X11-pasteboard-preferences.png>

The changes will take effect immediately (no need to restart Inkscape or
X11), but you'll have to redo any earlier copy&pastes to keep the pasted
objects as vector objects instead of embedded bitmap images (with a
solid white background of the size of the object's bounding box).

Revision history for this message
Michael Roseman (mroseman) said :
#4

Unfortunately, no, as all our industrial software is Windows XP compatible only. We run Windows 7 with virtual machines for all our XP software. Also, these graphics are "made from scratch" so I don't think it would be a copy and paste issue.

Don't know if any of you are familiar with the industrial world, but if it helps at all, what I'm doing is programming a Siemens HMI. I'm making graphics that look like a top-down view of several different machines to put on the screen, importing the .png files into the Siemens graphics library.

Revision history for this message
Michael Roseman (mroseman) said :
#5

Okay everybody, thanks for your help. Chalk it up to me being inexperienced with both pieces of software (Inkscape and Siemens) but I finally (after re-reading the first reply) got the graphic to do what I wanted. Not only did I have to set the transparency in Inkscape, but also in Siemens :)

Thanks for the help!

Revision history for this message
Michael Roseman (mroseman) said :
#6

Thanks ~suv, that solved my question.