Problem using RSVG and external resources

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
tsdineen
Posts: 81
Joined: 2007-01-18T08:45:31-07:00

Problem using RSVG and external resources

Post by tsdineen »

When using librsvg to view svg formats and try to display an svg image with external resources, like <image xlink:href>, display will only find those images if they reside in CWD. This is because base_uri hasn't been set in librsvg. In the svg.c coder code, I added a line of code to set the base uri in the rsvg section, See below. This was a similar process test-display.c was using in the librsvg tree. Would you review this and add it to your next patch?

Code: Select all

      RsvgHandle
        *svg_info;
    
      svg_info=rsvg_handle_new();
      if (svg_info == (RsvgHandle *) NULL)
        ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");

      /* 02jan08 tsdineen - add for finding external resources */
      rsvg_handle_set_base_uri (svg_info, image_info->filename);

      rsvg_handle_set_size_callback(svg_info,SVGSetImageSize,image,NULL);
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Problem using RSVG and external resources

Post by magick »

We will apply your patch to ImageMagick 6.3.7-9 Beta within a day or two. Thanks.
Post Reply