Author Topic: Exported .png does not look like the .svg  (Read 4751 times)

May 27, 2017, 09:55:45 PM
Read 4751 times

charlotte

  • Sr. Newbie

  • Offline
  • **

  • 3
Hi-
I'm a very (very!) new user, and am having trouble with the export process. Specifically, I have created a diagram which is basically just black lines and a few grey shapes on a white background. In a few locations, I used white shapes to strategically cover up the lines. When I look at it in Inkscape, I can't see those shapes because they are the same color as the background. When I export, the background turns grey and the shapes stay there as big white areas. I need to know #1 how to keep the background from turning grey, because I want it white like the one I created, and #2 how to make these white areas not show up (although if the background was white it wouldn't be a problem!). I'm attaching the .svg version and the exported .png version.
thank you!

May 27, 2017, 10:54:41 PM
Reply #1

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Welcome to the forum!

Inkscape's background is transparent by default, although it does look white.  Inkscape doesn't use the traditional checkerboard pattern to indicate transparency....well, not on the canvas anyway.  You will see some checkerboard patterns in all the color controls.

The last stable release of Inkscape includes a new option to show the traditional checkerboard pattern for transparency.

But anyway, is it a gray background that you're seeing?  Or is it transparent, and whatever is behind it is gray?   Probably what you need to do, to make sure you have a white background in the exported PNG, is to draw a large white rectangle which is either the size of your page, or at least large enough to cover whatever part of the image you need a white background for.

However, if you really are getting an opaque gray background, it might have something to do with a Mac bug, which causes pasted objects to be rasterized.  So it's possible that's where the gray bg is coming from.  Although having said that, I don't see any rasterized objects in your SVG file.

Also, I would be remiss if I didn't mention that covering things up with opaque objects the same color as the background, to make other things the size you want, is pretty much the down and dirty way to do it, vectorially speaking.

If you like, we can explain more proper vector editing.  (Hint:  Node tool :node: )  Although if you don't plan to be using Inkscape in the future, that technique certainly serves the purpose for a one-time use.  :)

Let us know if the white rectangle behind the drawing works.
  • 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                       

May 28, 2017, 10:16:00 AM
Reply #2

charlotte

  • Sr. Newbie

  • Offline
  • **

  • 3
Hi-
Thanks! I am using a Mac, so I suppose it could be that- in the one I uploaded I only had one layer, and I hadn't created any kind of grey background, so I'm still not sure why it was defaulting to making it look grey in the parts that were transparent when exported to the png? (it looked white in the svg).

Anyhow, I put a white layer in behind everything and that seems to have solved it and now I have an exported version that looks like I want it to. thanks for the suggestion!

I just tried the node tool, and am not quite understanding how to use it to crop off the end of a curve without actually changing the shape of the curve? I can see how you would add new lines attached to the end node, or how to change the shape of the curve, but now how to just crop it?

thanks!


May 29, 2017, 08:03:04 AM
Reply #3

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
One of these days I'm going to write up a tutorial specifically on node editing.  You can do all kinds of things with the Node tool.  A lot of people like to avoid node editing, if at all possible.  But it doesn't bother me that much.  Anyway, for now....

If you're in a hurry, skip down to the paragraph starting with an asterisk *.  That's the direct answer to your question.  All the rest is plenty helpful, but maybe you need more time to digest it.

You can move nodes with the Node tool.  So you could move the end node to wherever you want it.  If it changes the curve, you can change it back with the node handles.  Click on a node to select it .  Notice those very thin, straight, blue lines with a tiny circle on the end?  You can grab that handle by the tiny circle, and move the handles around, which is how you can adjust the curve.  If you don't see any handles, it means the path segment on each side of the path are straight

Any time you see a handle, it means that there's a curve in the path, on whichever side of the node you see the handle.  It could be such a gentle curve, that it looks straight.  But usually that's a clue, if you see a handle but you really wanted that segment to be straight.  You can get rid of a handle and make that side perfectly straight, by holding the Ctrl key while you click on the circle.  Or if you have a straight segment that you want to curve, you can essentially drag a handle right out of the node.  Put the mouse over the node (it turns red when you're in the right place), and this time, hold the Shift key, then click-drag.  You'll see the handle come right out of the node.

There are a few kinds of nodes, but mostly you'll be working with either corner nodes (diamond shape) which usually make sharp corners, or smooth nodes (square shape) which make smooth curves.  For smooth nodes there are almost always 2 handles, and they always move together (when you drag one, the other one moves too).  The handles on corner nodes move one at a time.

You can delete nodes by clicking on it to select it.  Then either Edit > Delete or Delete key.  Or you can add more nodes.  Position the mouse over the path.  When you're in the right place, the mouse pointer will change to the finger pointer.  Then double-click.  You can also add/remove nodes from the control bar (the bar just able the horizontal ruler, usually.  It has different buttons and options and controls, depending on which tool you're using.

Also on the Node tool control bar, there are buttons for breaking a path and joining paths together.  For the image you showed us, you probably don't need to do much breaking and putting back together.  But you can only apply a fill color to a closed path.  Typically newbies will draw whatever they're working on, with a series of open paths.   Then they have to learn how to either join them together, or draw them all as one path to begin with.

*Anyway, what I usually do to make a path end where I want, if the path is a little too long, is add a new node at the place where I want it to end.  Then delete however many nodes are extending beyond the new node.  That new node absolutely prevents the curve from changing when the nodes on the other side are deleted.

Probably the reason I keep putting off writing a tutorial on node editing, is because it takes so darn many words to explain.  I've never made a video tutorial before.  But I have recently learned how to make videos.  So maybe it will be my first video tutorial, haha.

Anyway, there's even more than what I've mentioned to node editing.  A lot of different customizations and shortcuts.  You can learn more about it in the manual (Help menu > Inkscape manual).  Although it's not particularly well-written for newbies, it still does contain most everything you need to know.  http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Paths.html  (We're working on a new manual that will be written specifically for newbies, but it won't be ready for some months yet.)

Anyway, that much info should give you a good start.  But feel free to ask questions, if there's something particular that you can't figure out.

Edit
Then there's the whole subject of aligning things - paths, nodes, objects.  I'll just mention guides, grids and snapping, which you can look up in the same manual as above (different chapters).  You can also place nodes on precise x,y coordinates, and you can find the X and Y fields on the control bar, where you can enter the values.  Inkscape is well suited for drawing with geometric precision, in my opinion, although some people have complaints about how Inkscape does so.  But that's yet another different subject.

Oh, I forgot, I meant to mention this info about using Inkscape on Macs.  Since you have it installed, you've probably already addressed most of the concerns, but just in case:  https://inkscape.org/en/learn/faq/#Mac_OS_X_specific_issues
  • 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                       

May 29, 2017, 02:57:45 PM
Reply #4

charlotte

  • Sr. Newbie

  • Offline
  • **

  • 3
Wow, thank you SO much for writing this all out, I really appreciate it. It may take a bit to digest and mess around with it more but I will let you know if any questions or anything come up. And, I'm sure a video would be very helpful for people like me if you feel like doing one in the future :)

thanks!!