Inkscape.org
Beginners' Questions How can I open SVG files with transparency?
  1. #1
    BigLouis1971 BigLouis1971 @BigLouis1971

    I'm using Windows 10 Home and Inkscape 1.1.

    I have a bunch of SVG files that are supposed to have transparency but, when I open them in Inkscape they have a black background. I selected "Checkerboard Background" from the "Document Properties" menu but, the background is still black. I noticed that I can remove the black background layer and delete it and the file works as it is intended to work. The thing is that I have 100 of those SVG files and it'll take me a few hours to do that to every file. I was hoping that there's a way to make black transparent because it'll be less work. Can somebody help me with that? Thanks in advance!

  2. #2
    inklinea inklinea @inklinea⛰️

    Would have to see an example svg.

    Are you able to post 1 or 2 ? 

  3. #3
    BigLouis1971 BigLouis1971 @BigLouis1971

    I'm new to the forum and Inkscape. How can I post the files?

  4. #4
    Polygon Polygon @Polygon🌶

  5. #5
    BigLouis1971 BigLouis1971 @BigLouis1971
    *

    Here are some SVGs. Thanks!

  6. #6
    inklinea inklinea @inklinea⛰️

    What OS are you using ? 

     

  7. #7
    BigLouis1971 BigLouis1971 @BigLouis1971

    I'm using Windows 10 Home Edition.

  8. #8
    inklinea inklinea @inklinea⛰️
    *

    It looks like there is a large black rectangle behind each image.

    Removing the rectangle makes the image look totally different. 

    Is that what you want to do ? 

    Astronaut Jellyfish 2021 09 11 01 32 13
  9. #9
    inklinea inklinea @inklinea⛰️

    Also, are you happy to use the Windows command line / powershell command line ? 

  10. #10
    BigLouis1971 BigLouis1971 @BigLouis1971

    If there's no more choice, I would like to remove the black rectangle. Why do you ask about the Windows command line / PowerShell command line?

  11. #11
    Polygon Polygon @Polygon🌶

    The images rely on the black background - deleting destroy it imho.

  12. #12
    inklinea inklinea @inklinea⛰️

    It's likely that the black rectangle may be the largest <rect> object in each of the 200 svg files.

    It's also possible that any of the 200 files could contain other <rect> objects.

    It does not have an id attribute ( it may have in other files ). 

    I think the easiest way would be to identify it by 

    1. It is a <rect>

    2. It has a width * height ( area ) larger than any other <rect> in the file.

    Then delete it across files.

  13. #13
    Martin Owens Martin Owens @doctormo🌹🧀

    SVG files don't have backgrounds (it's one of their limitations), all backgrounds you see are actually objects on the document.

Inkscape Inkscape.org Inkscape Forum Beginners' Questions How can I open SVG files with transparency?