[RESOLVED] Trouble with Curved Path in Bitmap Export

Post questions on how to use or achieve an effect in Inkscape.
AMizener
Posts: 5
Joined: Sat Jul 14, 2012 4:48 pm

[RESOLVED] Trouble with Curved Path in Bitmap Export

Postby AMizener » Sun Jul 15, 2012 6:00 pm

I am having trouble with the bitmap export using a particular curved-but-enclosed path (wavy horizontal bars). In particular, the peaks of the waves are not properly exported.

This is what the shape looks like, with the wavy bars selected to show the nodes:

Image

This is what the exported version looks like (resizing killed the transparency):

Image

Note center-top peak of the upper bar, and lower-left of the lower bar.

I have tried exporting at multiple sizes and resolutions, various groupings, unions, and combinations of the two bars, and (the old standby) restarting the program (all except for the last suggested by previous threads). The bars never export correctly. Different sizes and resolutions export differently: greater or lesser degrees of cut-off, sometimes the stroke exports properly but the fill does not, etc., but at no attempted resolution does it export correctly (and I've tried several).

I am hoping to get a specific exported image-size, but it's a moot point as I can't get it to work at any resolution. I am using Inkscape 0.48.2 r9819 on a PC running Windows 7 Ultimate (32-bit, SP 1).

Does anyone have any suggestions for how to resolve this?
Last edited by AMizener on Tue Jul 17, 2012 2:52 am, edited 1 time in total.

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

Re: Trouble with Curved Path in Bitmap Export

Postby brynn » Sun Jul 15, 2012 6:58 pm

Welcome to InkscapeForum!

So if I understand, you don't see that in the SVG? It's only iin the PNG? You must have seen the topic that suggests trying different export options, to fix this. Unfortunately it's not a guaranteed fix. The new renderer should be a fix, but that's not expected out until next year.

Have you tried changing the size of the object? It doesn't necessarily need to be much of a change. Even 1 pixel might work....oh wait, ok you said you tried different sizes. Well actually, what different sizes did you try? If you tried for example, multiples of 5 or 10, you could also try multiples of 2 or 3. I seem to recall something about something in multiples of 3, although that might have been the message I already mentioned, that I think you already saw.

What about moving it to a different location on the canvas? If you turn off the page border, and use the Drawing option in the Export dialog, moving it won't change anything in the final result.

What if you rotate 90 degrees, the whole thing, so that the stripes are generally vertical? Maybe that would work? You'd have to use another program to rotate back. But if nothing else will work.....??

I think it's the wavy pattern that has the exporter malfunctioning. If it would work in your drawing, you could try making the stripes thinner or fatter -- all the same width, or even slightly different widths. I'm just talking about 1 or 2 pixel changes.

Beyond that, I don't know. Maybe someone else will have an idea?

User avatar
Maestral
Posts: 982
Joined: Sat Aug 27, 2011 7:10 am

Re: Trouble with Curved Path in Bitmap Export

Postby Maestral » Sun Jul 15, 2012 9:57 pm

I`ll add a few quick suggestions, I can`t recall in which topic they were elaborated, but if you have changed the size of the canvas/page and due to the pixel alignment this could happen.

Similar things happen to me when I was exporting some complex drawings but in a smaller/reduced size. Still, errors which I had are not quite similar with these. It rather looked like some small portions were filled by stroke color instead of it`s own color / it was like small inner space of letter "e" filled by stroke color instead being filled with background color (just a comparation). At that time I messed some precision settings and bringing it back to default sorted things out in a desired manner.

Also, these "cuts" looks like there is a shape over the both places where it occurs. Kind of a mask or a clip? Could you share this .svg with us, to take a closer look at it?
:tool_zoom: <<< click! - but, those with a cheaper tickets should go this way >>> :!:

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Trouble with Curved Path in Bitmap Export

Postby druban » Mon Jul 16, 2012 5:28 am

Can you provide the SVG file to look at? I suspect that you have grouping, layering, masking or filtering problems, but unlikely to be all of these.
Try downloading a different version of Inkscape and seeing if the problem goes away. 0.48.3 perhaps?
Your mind is what you think it is.

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: Trouble with Curved Path in Bitmap Export

Postby ~suv » Mon Jul 16, 2012 6:07 am

Difficult to confirm without access to the SVG, but based on my experience this looks like one of the known glitches of the old renderer in current stable versions of Inkscape, which may vary depending on the export resolution used, and sometimes can be worked around by inserting additional nodes into the bezier curves (see also Re: Export "artifact", Re: Error with exported image).

(Probably #189214 -it has many duplicate reports which describe similar variations of the same underlying issue.)

druban wrote:Try downloading a different version of Inkscape and seeing if the problem goes away. 0.48.3 perhaps?
Inkscape 0.48.3 won't help if it's the above known issue - the major changes to Inkscape's render (also used for bitmap export) are only available in unstable development builds).

AMizener
Posts: 5
Joined: Sat Jul 14, 2012 4:48 pm

Re: Trouble with Curved Path in Bitmap Export

Postby AMizener » Mon Jul 16, 2012 3:02 pm

Hi, all.

Thanks for the welcome, and thanks for your help. I have attached the file.
It's a pretty simple file, just the keystone (the blue trapezoidal shape), and two wavy bars (currently either combined or unioned [I forget which], but originally two separate objects with no change in the problem).

I'll play around with some of your suggestions (rotating it, adding extra nodes, etc.) in the morning. I've tried exporting to any number of sizes, with no real pattern to the ones I tried: increases of scalar numbers of pixels, increases of multiples, random permutations - nothing has fixed it so far, so I don't think that's going to help.

Thanks again.
Attachments
AzureKeystoneofElfsea.svg
(4.36 KiB) Downloaded 178 times

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

Re: Trouble with Curved Path in Bitmap Export

Postby brynn » Mon Jul 16, 2012 6:15 pm

I'm pretty sure it's the renderer. I've tried moving the wavy stripes higher or lower. The first time, I moved the top stripe up approx 12 pixels. The export was almost perfect. But after trying moving the stripes by different amounts, and even trying the 12 pixels again, I can't get a better export.

But when I rotated the entire thing 90 degrees, the export IS perfect!

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Trouble with Curved Path in Bitmap Export

Postby druban » Mon Jul 16, 2012 7:23 pm

I can confirm ~suv's diagnosis, 48.3 fails to export properly, and export from dev build rev 11515 does not show the error.
AzureKeystoneofElfsea48.3.png
AzureKeystoneofElfsea48.3.png (18.4 KiB) Viewed 2593 times
AzureKeystoneofElfsea.png
AzureKeystoneofElfsea.png (18.61 KiB) Viewed 2593 times
Your mind is what you think it is.

AMizener
Posts: 5
Joined: Sat Jul 14, 2012 4:48 pm

Re: Trouble with Curved Path in Bitmap Export

Postby AMizener » Tue Jul 17, 2012 2:51 am

Thanks all. I just tried adding nodes, and that worked perfectly on the first try. I'll just have to deal with the node spacing being uneven and ugly. :)
I will mark this thread as resolved.

I greatly appreciate the help.

User avatar
Maestral
Posts: 982
Joined: Sat Aug 27, 2011 7:10 am

Re: [RESOLVED] Trouble with Curved Path in Bitmap Export

Postby Maestral » Tue Jul 17, 2012 5:03 am

Glad to hear you have found the way to solve this, but there`s something which might help you making it "not ugly" ,)
I`ve noticed that you placed nodes in the middle of the curve which made me wonder - have you tried to create this kind of waves with nodes at the peaks (highest and lowest points) of curves?

If you know how many "waves" you need, divide the line at the desired number of sections and make those nodes curved. Select odd/even nodes and move them at desired distance, correct curves if needed and it might be even quicker then making curves just on each second node, as in your file. Just a thought...
:tool_zoom: <<< click! - but, those with a cheaper tickets should go this way >>> :!:


Return to “Help with using Inkscape”