White spaces around my images.

Post questions on how to use or achieve an effect in Inkscape.
FLYNN
Posts: 2
Joined: Wed Apr 13, 2016 4:53 am

White spaces around my images.

Postby FLYNN » Wed Apr 13, 2016 5:23 am

Hello, I'm here today to ask how can I solve this issue that I'm having when exporting my images from Inkscape to game maker. I need to create an image of a gray square and then export that from Inkscape to be used in my game. The problem is that when I do that my image is not as I would expect. As you can see from the images that I've posted my gray square(second picture )has some white spaces around it.
While in the other image (I took that one as an asset included in my game maker tutorial) there aren't those spaces. I'm new to both Inkscape and game maker and I don't know if this is a problem of the game engine or if I'm doing something wrong when I export the image. Thank you.
Attachments
Cattura3.PNG
Cattura3.PNG (12.59 KiB) Viewed 1428 times
Cattura1.PNG
Cattura1.PNG (20.65 KiB) Viewed 1429 times

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: White spaces around my images.

Postby Moini » Wed Apr 13, 2016 6:44 am

How do you export the image from Inkscape? Export -> PNG image ? What is the color of the page background - is it white opaque or white transparent? Can you upload the SVG, and your PNG?
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

FLYNN
Posts: 2
Joined: Wed Apr 13, 2016 4:53 am

Re: White spaces around my images.

Postby FLYNN » Wed Apr 13, 2016 7:37 am

Moini wrote:How do you export the image from Inkscape? Export -> PNG image ? What is the color of the page background - is it white opaque or white transparent? Can you upload the SVG, and your PNG?

I export the image as a png file, The page background in Inkscape is white. Game maker doesn't support svg files, just PNG.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: White spaces around my images.

Postby Moini » Wed Apr 13, 2016 7:41 am

@FLYNN: white opaque or white transparent? If you want a transparent background, you need to move the alpha slider for the white background to 0 in the document properties. I could tell if I had the svg to look at...
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: White spaces around my images.

Postby brynn » Wed Apr 13, 2016 9:19 am

Inkscape does not use the checkerboard pattern that most of not all raster graphics programs use to indicate transparency. So unless you have intentionally changed Inskcape's background, the PNG you export will be transparent around the edges, even though it looks white in Inkscape.

However, showing white in your game app would give the impression that it is white and not transparent, because your first screenshot shows the checkerboard.

How did you create the PNG? If you used File menu > Save As Cairo png, then indeed it is white and not transparent. The proper way would be to use File menu > Export PNG Image.

Glavaride
Posts: 1
Joined: Tue Apr 12, 2016 3:33 pm

Re: White spaces around my images.

Postby Glavaride » Wed Apr 13, 2016 5:26 pm

brynn wrote:Inkscape does not use the checkerboard pattern that most of not all raster graphics programs use to indicate transparency. So unless you have intentionally changed Inskcape's background, the PNG you export will be transparent around the edges, even though it looks white in Inkscape.

However, showing white in your game app would give the impression that it is white and not transparent, because your first screenshot shows the checkerboard.

How did you create the PNG? If you used File menu > Save As Cairo png, then indeed it is white and not transparent. The proper way would be to use File menu > Export PNG Image.


Thanks for this post. Actually had this similar question myself. I hadn't realized til seeing this thread and realized that the outline wasn't white but transparent. Guess that answered my question though. Though I have another issue which I will post in a more suitable thread, I just came here to say thanks.


Return to “Help with using Inkscape”