gotcha

Author Topic: Removing white background when saving in PNG format  (Read 5756 times)

April 27, 2017, 04:29:39 AM
Read 5756 times

ghcoupons

  • Sr. Newbie

  • Offline
  • **

  • 4
Hello everyone.  Very basic question but I just can't seem to get this one done.  I'm trying to save some files to printful and I need to save them in a PNG format.  Problem is, I cannot for the life of me find a way to remove the white background from the image.  I found some tutorials but they were from 2010 or the rules are different for a MAC so i can't get this, what I assume is a very simple task accomplished.  Any assistance is greatly appreciated! 

April 27, 2017, 05:52:23 AM
Reply #1

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Welcome to the forum!

We will need some more information before we can figure out why there is a white background in the first place.

Did you draw these images in Inkscape?  If so, Inkscape's background is transparent by default.  So using File menu > Export PNG should produce a transparent background.

However, it gives me a clue that you're using Inkscape on a Mac.  There's a bug which affects Inkscape on a Mac in which pasting an object rasterizes it, or in other words, turns it into a raster image.

Here's some info on using Inkscape with a Mac.  You'll probably want to read all the issues, but the one about pasting is in there too.  If I understand correctly (which I'm not sure if I do)  I think there's a way to set it up so that you can paste without having this problem.  Or you can just use Duplicate instead of copy/paste.

https://inkscape.org/en/learn/faq/#Mac_OS_X_specific_issues

If you've gone through all that, and you still have this trouble, can you share an SVG file with us which contains an image that you want to export to PNG?  Then we can investigate.

  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

April 27, 2017, 07:08:33 AM
Reply #2

ghcoupons

  • Sr. Newbie

  • Offline
  • **

  • 4
That was a very helpful reply, thank you!  Let me digest some of this and play around with the advice given and I'll report back.  Have a good day".

April 27, 2017, 07:29:53 AM
Reply #3

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Just for your interest: 'Save as...' > 'Cairo PNG' will give you a white background. A Cairo PNG is different from a normal PNG in that it doesn't support all the features. I suspect that's what you might have been using. So make sure to use the 'Export to PNG' dialog for exporting.

April 27, 2017, 08:02:03 AM
Reply #4

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
I agree, that's another possibility  :)
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

April 27, 2017, 10:34:41 AM
Reply #5

ghcoupons

  • Sr. Newbie

  • Offline
  • **

  • 4
So the lastest is this. I am using the latest version of ink scape. I am using a MacBook Pro. I have followed the instructions for the workaround regarding copy and paste issues. I am creating the illustrations in vector form and saving them as SVG files. I open an SVG file then select export as png and this is what I keep getting, a white background. So when I enter this into any mock up generator, it's a black article of
Clothing with a white box and my Designs in the middle. When I select export in PNG file it does ask questions about page, drawing, selection. Maybe I am missing something on that page?  I am 100% certain I am exporting a SVG file to PNG. I am not saving the file  as Cairo PNG. If I wasn't already bald I'd pull my hair out. Lol.

April 27, 2017, 10:49:04 AM
Reply #6

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Don't worry, we'll figure it out  :)

Those options in Export PNG dialog are for choosing which portion of the file you want to export.  You can export just what is selected, or just what's in the page borders, or the whole drawing no matter about the page border, or some custom area.  They probably don't have anything to do with this white background issue.

And you didn't import anything?  Didn't click Edit menu > Make a Bitmap Copy?  Is there any chance there might be a big white object (rectangle or circle or something) that you forgot was there?  If it doesn't have a stroke, and you haven't changed Inkscape's background, it's effectively invisible.

Can you share a sample SVG file with a problematic object or drawing, so we can investigate or test with it?
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

April 27, 2017, 05:59:56 PM
Reply #7

ghcoupons

  • Sr. Newbie

  • Offline
  • **

  • 4
Well, it works now.  I went back thru time after time after time and it wouldn't work and then all of the sudden, it worked.  I have no idea why.  lol  Thanks for the help but I'm gonna ride this wave until it crashes!

April 27, 2017, 07:59:18 PM
Reply #8

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann