SVG including an image without file extension
Posted: 2014-09-10T01:29:44-07:00
Hi!
I currently converting a SVG to PNG, which works pretty well.
Due a technical limitation in the backend of my companies software, all images will be saved without a file extensions (stone instead of stone.png), just the MIME types is set.
The SVG which will now be generated may look something like this (simplified):
The problem now is that Magick.NET or ImageMagick (I don't know which one is the culprit -> maybe this topic needs to be moved) won't rasterize the image in the SVG, because it has no extension (only the blue rectangle is in the final png). I guess Magick.NET or ImageMagick gets the image type from the file extension and needs it to rasterize the image?!?
If I add a file with a extension, everything works like a charm.
My question: Is there a solution/setting to allow images in SVG without file extension?
I currently converting a SVG to PNG, which works pretty well.
Due a technical limitation in the backend of my companies software, all images will be saved without a file extensions (stone instead of stone.png), just the MIME types is set.
The SVG which will now be generated may look something like this (simplified):
Code: Select all
<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" version="1.1" viewBox="0 0 619 345" width="619" height="345">
<image width="300" height="232" opacity="1" xlink:href="https://devpublic.blob.core.windows.net/companies/INDIVALUE/resources/02449SLRKtc" />
<rect width="100" height="50" style="fill:rgb(0,0,255);" />
</svg>
If I add a file with a extension, everything works like a charm.
Code: Select all
<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" version="1.1" viewBox="0 0 619 345" width="619" height="345">
<image width="300" height="232" opacity="1" xlink:href="https://devpublic.blob.core.windows.net/companies/INDIVALUE/resources/02449SLRKtc.png" />
<rect width="100" height="50" style="fill:rgb(0,0,255);" />
</svg>