convert truncating SVG

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
seang_dox
Posts: 2
Joined: 2012-08-02T09:55:48-07:00
Authentication code: 15

convert truncating SVG

Post by seang_dox »

I am using convert (Version: ImageMagick 6.7.8-7 2012-07-29 Q16) to generate a raster image from an SVG. Aside from having to explicitly specify the size (as there is no viewBox attribute in the top level svg element) I encountered no errors/warnings.

$ convert -verbose -size 112x28 card-112x28.svg card-112x28.png
mvg:C:/2_ProgramFiles/cygwin/tmp/magick-2SgqFrwt=>C:/2_ProgramFiles/cygwin/tmp/magick-2SgqFrwt MVG 112x28 112x28+0+0 16-bit DirectClass 744B 0.000u 0:00.000
card-112x28.svg SVG 112x28 112x28+0+0 16-bit DirectClass 744B 0.000u 0:00.030
card-112x28.svg=>card-112x28.png SVG 112x28 112x28+0+0 16-bit PseudoClass 12c 0.000u 0:00.016

The image below shows a screengrab of a HTML table showing the SVG next to the PNG.

Image

Any idea what's happening here & how to fix it? I searched the forums for SVG truncation & couldn't find any posts quite like my issue.

SVG content below (note the last lineto is omitted as the 'z' closes the path, as per the SVG standard):

Code: Select all

<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
  <!-- Generated by createSVG v0.4 on 02 Aug 2012 @ 17:57:51.  -->
  <defs>
    <symbol id="card-112x28">
      <!-- Card -->
      <rect x="0" y="0" width="112" height="28" style="stroke:#E6E6E6; fill:#E6E6E6; "/>
      <!-- Tabs (orientation=horizontal) -->
      <path d="m 1 1 l 15 0 l 0 4 l 3 0 l 0 -4 l 76 0 l 0 4 l 3 0 l 0 -4 l 15 0 l 0 26 l -15 0 l 0 -4 l -3 0 l 0 4 l -76 0 l 0 -4 l -3 0 l 0 4 l -15 0 z"
             style="stroke:#00257E; fill:#FFFFFF; "/>
      <!-- Left Screw -->
      <circle cx="105" cy="14" r="3" style="stroke:#00257E; fill:#FFFFFF; "/>
      <line x1="105" y1="11" x2="105" y2="17" style="stroke:#00257E; "/>
      <!-- Right Screw -->
      <circle cx="7" cy="14" r="3" style="stroke:#00257E; fill:#FFFFFF; "/>
      <line x1="7" y1="11" x2="7" y2="17" style="stroke:#00257E; "/>
    </symbol>
  </defs>
  <use xlink:href="#card-112x28"/>
</svg>
seang_dox
Posts: 2
Joined: 2012-08-02T09:55:48-07:00
Authentication code: 15

Re: convert truncating SVG

Post by seang_dox »

[bump]

No ideas anyone? :?:
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: convert truncating SVG

Post by magick »

Perhaps its your release of the librsvg delegate library. We're using RSVG 2.36.1 and ImageMagick 6.7.8-9 and we get the expect results (path is closed).
Post Reply