Page 1 of 1

convert svg to png loses color information in certain files

Posted: 2008-05-02T18:34:23-07:00
by coregis
I have a stack of 150 files to convert from svg to png. Most of the files convert just fine, but about 10 of them lose all color information after transforming.

I'm using mogrify +antialias -depth 8 -format png *.svg

but even trying mogrify -format png *.svg or convert Fig_106.svg Fig106.png will still lose all the colors in these 10 files.

This becomes all black in colored areas.
This converts fine.

I can convert to colored png fine with gimp, but I can't seem to switch off antialiasing.

Any clues as to what is happening?

Thanks.

Re: convert svg to png loses color information in certain files

Posted: 2008-05-02T18:47:40-07:00
by magick
Looks like you are using the ImageMagick internal SVG renderer which does not support style sheets. If the RSVG delegate is available when ImageMagick is built it will use it instead of the internal renderer and will produce the image you expect. Type
  • identify -list configure
and look for rsvg associated with the DELEGATES tag.