Remote images in SVG not retrieved when run on Web server

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
adamschneider

Remote images in SVG not retrieved when run on Web server

Post by adamschneider »

I have a perl program running on my Web server that allows you to upload an SVG file and have it converted into a JPEG, using ImageMagick's "convert" program. It works perfectly, except for one thing: remote images (included in the xlink attribute of an <image> tag) are not included. They ARE downloaded and included in the JPEG if I run the program from the command line, however. It's only when I run /usr/bin/convert from the Web that I have problems.

Here's a minimalist .svg file that illustrates the problem:

Code: Select all

<svg height="302" width="600" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
	<image width="600" height="302" id="map" x="0" y="0" xlink:href="http://onearth.jpl.nasa.gov/wms.cgi?request=GetMap&layers=global_mosaic&styles=&srs=EPSG:4326&bbox=-122.0574699,36.8846530,-121.7583218,37.0051803&WIDTH=600&HEIGHT=302&format=image/jpeg" />
</svg>
Again, this works perfectly if I issue the following command at a Unix prompt on the server: /usr/bin/convert test.svg test.jpg

It only fails to retrieve the background if convert is invoked from within a CGI script on the Web server. So it seems to be a permissions issue within ImageMagick. (Other perl programs have no qualms about retrieving similar remote data.)

This is "ImageMagick 6.2.8 04/17/08 Q16", installed via yum on CentOS. Any ideas?
eladio

Re: Remote images in SVG not retrieved when run on Web server

Post by eladio »

Here from imagick in php we have the same problem.

In console with convert command works fine, but when we try to do conversion in php code the image we dont see the image imported, only white background color.
Post Reply