export bitmap - gradients aren´t fluent

Post questions on how to use or achieve an effect in Inkscape.
julo
Posts: 31
Joined: Thu Oct 30, 2008 3:29 am

export bitmap - gradients aren´t fluent

Postby julo » Thu Jan 29, 2009 6:41 am

When I export svg as png (bitmap) I have problems with gradients. Gradients aren´t fluent (continuous), but colors are changed after steps, no continuously. Why? After next saving as jpg are this steps in gradient more marked. In full resolution you can see „lines“ or borders of colors. I try save images with 600 dpi, too.
For example:
http://www.picupine.com/ab06d19x

caveman

Re: export bitmap - gradients aren´t fluent

Postby caveman » Thu Jan 29, 2009 7:38 am

Hi Julo!

The effect that you see in your images is called "Color banding".

Ref: http://en.wikipedia.org/wiki/Colour_banding

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: export bitmap - gradients aren´t fluent

Postby prkos » Thu Jan 29, 2009 7:40 am

It's a bug in Inkscape, try to go around it by using more objects.

https://bugs.launchpad.net/inkscape/+bug/180693
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

User avatar
EarlyBlake
Posts: 302
Joined: Tue Jun 03, 2008 5:42 pm

Re: export bitmap - gradients aren´t fluent

Postby EarlyBlake » Thu Jan 29, 2009 11:37 am

I ran in to this problem tonight. It seem to be worses when the gradient is between too color that was close together. I got some really strange effects when I blurred it and layed two gradients. Can't post it right now I'm at my other computer.

prkos wrote:It's a bug in Inkscape, try to go around it by using more objects.

https://bugs.launchpad.net/inkscape/+bug/180693


How do you mean using more objects?

julo wrote: After next saving as jpg are this steps in gradient more marked.


Won't the jpeg alway add some stepping in a gradient, by the way it encodes. It basically breaks an image into a bunch of boxes, don't it?

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: export bitmap - gradients aren´t fluent

Postby prkos » Thu Jan 29, 2009 12:27 pm

Using more objects: for the first posts image - make for example 3 smaller rectangles, equal width as the example image but 3 times smaller in height. Then place them on top of the original image one next to the other vertically, and apply 3 different gradients, dark colors on the top rectangle, lighter in the middle and lightest on the bottom. Don't forget to use the same gradient steps on the seams.
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: export bitmap - gradients aren´t fluent

Postby microUgly » Thu Jan 29, 2009 3:55 pm

If you would like a work around, you could use Batik Rasterizer to convert the SVG to PNG.

julo
Posts: 31
Joined: Thu Oct 30, 2008 3:29 am

Re: export bitmap - gradients aren´t fluent

Postby julo » Fri Jan 30, 2009 6:20 am

Thanks to all. I will try sentence with batik but it seems too hard for me.


Return to “Help with using Inkscape”