Page 1 of 1

Problem using RSVG and external resources

Posted: 2008-01-02T15:37:55-07:00
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);

Re: Problem using RSVG and external resources

Posted: 2008-01-02T17:07:50-07:00
by magick
We will apply your patch to ImageMagick 6.3.7-9 Beta within a day or two. Thanks.