Author Topic: [Solved]svg picture from Inkscape is displayed all black by Gimp.  (Read 3462 times)

January 15, 2018, 02:05:00 AM
Read 3462 times

amorales

  • Sr. Newbie

  • Offline
  • **

  • 3
Hi:
A svg drawing created with Inkscape 0.92 and displayed with Gimp 2.8.18 using Debian 9.3 is shown all black. But is correctly displayed  with Display  version ImageMagick 6.9.7-4. Is it a problem with Gimp or Inkscape? I am attaching the svg file.
Any suggestion to track and solve the problem will be welcome.
« Last Edit: January 16, 2018, 04:12:11 PM by amorales, Reason: To include the word: [Solved] »
  • 0.92
  • Debian 9.3

January 15, 2018, 06:03:07 AM
Reply #1

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Without looking at the picture, my suggestion is:
Don't use flowed text when you want to use the SVG in another application.

Select text, do 'Text > Convert to text', or, if you don't want to edit it anymore, you can also do 'Path > Object to Path' for maximum compatibility, even on computers that do not have the font installed that you're using.

More info here: https://inkscape.org/en/learn/faq/#flowed-text-doesnt-show-exported-file

January 15, 2018, 11:16:15 PM
Reply #2

amorales

  • Sr. Newbie

  • Offline
  • **

  • 3
Dear Moini:
I made both 'Text > Convert to text' and 'Path > Object to Path but the problem remains the same. Following your explanation I tried to reproduce the problem in a new picture. Flowing text, flowing latex text and so on, but all the time I don't have problem to  see the picture with Gimp. Looks that the file I sent has a problem that I can not reproduce.
Seems that the only solution is to redraw the picture completely.
Thanks.
  • 0.92
  • Debian 9.3

January 16, 2018, 12:56:24 AM
Reply #3

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Yes, I can reproduce the problem, using GIMP 2.8.18.

There's probably not much of a chance I can identify the problem (given my skill set).  But I'll have a look at the SVG anyway.  Who knows?
  • 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                       

January 16, 2018, 01:34:43 AM
Reply #4

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Well I can't say that I identified the problem.  But I seem to have solved it!

Using the tab key, you can select one object after the other, whether it's visible or not.  So when I pressed tab, and didn't see a bounding box on the canvas, I looked at the status bar.  There were several Groups of 1, which when ungrouped, were identified as a Group of 0.  Since I don't know of any way to create a group of 0 in Inkscape, I would guess they were the result of a file conversion, somewhere along the line.  (certain file conversions put everything into groups)  (Empty text objects would be a good guess, in this case.)

Anyway, after getting rid of the empty groups, I saved the file as Inkscape SVG, and now it opens in GIMP as expected.

Just to rule out that it was the save (which does sometimes fix something, just to do a simple save), I tried saving the file immediately after downloading, and it didn't fix it.  So it must have been one of those empty groups.  (Maybe one of more of them had some code in it, but not a visible object??)  If it matters, someone else might be able to figure out which group and what was in it.

You can also use Object menu > Objects, to find the empty groups.
  • 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                       

January 16, 2018, 04:10:33 PM
Reply #5

amorales

  • Sr. Newbie

  • Offline
  • **

  • 3
Dear brymn:
You are right. Deleting that 0 objects the problem is solved.  With Object menu > Objects, I found the problematic groups
and deleted them.  How I got that mess, came they from the flown text?
Thank you very much.
  • 0.92
  • Debian 9.3

January 16, 2018, 04:58:39 PM
Reply #6

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Yes, the issue was a flowed text. Just don't click and drag, only click, to create text.

January 17, 2018, 11:45:45 PM
Reply #7

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Speaking of the empty groups, I don't know where they came from.  Not for sure.  I'm not sure if all the empty groups were flowed text or not....I suppose it's likely.  But regarding the empty groups.

Often when a vector file is opened in Inkscape, which either is a non-SVG vector format, or it's an SVG file created in a different vector editor or program which can support SVG, Inkscape puts a group around every object.  It's just how Inkscape handles it.  I suspect that other vector editors or programs sometimes do the same thing.  Sometimes I wonder if some extensions do that too.

I'm just speculating that an empty text object could be the source of the empty groups.  The empty text object (oddly) can be either flowed or regular text.  This is how I speculate that it might happen.  If you either click on the canvas with the text tool (regular text), or drag a text box (flowed text) a new text object is created.  But let's say you change your mind and go do something else, and you never type anything in the text object -- that makes an empty text object.  (Status bar will say "Text (0 characters)....")    Or even you make 3 tries to get the text in the right place, on the first try.  You'll have 2 empty text objects and one where you finally type something.

You can't necessarily see them, so you don't know they're there.  (I think I made a feature request a while back, to make them more visible and selectable.)  And you can't necessarily select them either.  If you can manage to select them, they might or might not be showing a bounding box.  In your case, they did not.  But I have seen them with a 1 square pixel size bounding box.  When I first discovered empty text objects, I had a file with around 25!

Anyway, let's say you take the file and import into some other program, to do some special editing (maybe a math program or latex, to get special characters or something).  When you bring it back into Inkscape, Inkscape doesn't recognize it as its own (well ok, that's me anthropomorphizing Inkscape, but I think that's a reasonable analogy) and puts a group around each and every object, and now the empty text object becomes a Group of 0.  Let's say you need to go back to that program again.  When you come back to Inkscape -- another group.  So now the Group of 0 becomes a Group of 1, even though there's nothing in it.

Maybe there's a bug in that routine, somewhere along the line?  I don't know. 

I think things just get really sticky, and really tricky, and really fast, when you put a different program and/or a file conversion into the mix.
  • 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