Converting SVG with negative boundaries

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
panisson
Posts: 1
Joined: 2011-02-17T02:48:39-07:00
Authentication code: 8675308

Converting SVG with negative boundaries

Post by panisson »

Hi all,

I have a svg file with the following content:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
    "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg contentScriptType="text/ecmascript" width="1150px"
     xmlns:xlink="http://www.w3.org/1999/xlink" zoomAndPan="magnify"
     contentStyleType="text/css" viewBox="-879 -977 773 565" height="841px"
     preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg"
     version="1.1">
    <g id="edges">
        <path stroke-width="3.0"
              d="M -850.032471,-440.960083 L -134.113083,-948.163879"
              stroke="#0000ff"/>
    </g>
</svg>
Any svg visualizer (Gnome image viewer, Okular, Firefox, Chrome...) shows a line from the lower-left to the upper-right.
Whathever arguments I try to convert it from svg to png using the convert command line, the image is always blank. There's any way to show this image as the other standard visualizers do?

I'm using Ubuntu 10.04 and ImageMagick 6.5.7-8 2010-12-02 Q16

Thanks!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Converting SVG with negative boundaries

Post by magick »

It could be a bug in ImageMagick 6.5.7. We tried your SVG script with ImageMagick 6.6.7-7, the current release, and it displayed properly.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Converting SVG with negative boundaries

Post by anthony »

For a IM with RSVG delegate this works fine

For IM using MSVG it fails.. (blank white image)

For information on the two methods of SVG rendering see
http://www.imagemagick.org/Usage/draw/#svg
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply