Inkscape renders this image as I'd expect, where I can clearly make
out the 25 boxes, but rsvg-view and firefox both smooth the image and
I cannot figure out how to turn them off. I've gone through a lot of
the svg specification to no avail. Below I have my attempt at
filter="none" that doesn't make a difference in my image. Does anyone
have any help or suggestions on fixing this? Is this a bug of
firefox's svg renderer? I can't seem to find any well defined answers
and I figure I would try here before jumping to adding a bug.
----------------------------------------
<?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 width="612pt" height="792pt" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
<g transform="translate(0,792) scale(1,-1)">
<text x="306" y="54.6" transform="scale(1,-1) translate(0,-792)"
fill="#000000"
style="font-size:12pt;font-family:monospace;text-
anchor:middle;">
Bitmap Test -- (5x5)
</text>
<rect x="10" y="10" width="592" height="694.8" fill="none"
style="stroke:black;stroke-width:1pt;"/>
<image x="20" y="20" width="572" height="674.8" filter="none"
preserveAspectRatio="none"
xmlns:xlink="http://www.w3.org/1999/xlink" xlink:show="embed"
xlink:href="data:image/
png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAAAXNSR0IArs4c6QAAAFtJREFUCB0BUACv/
wAAAAAAMwAAZgAAmQAAzAAAMwAAMzMAM2YAM5kAM8wAAGYAAGYzAGZmAGaZAGbMAACZAACZMwCZZgCZmQCZzAAAzAAAzDMAzGYAzJkAzMwAagIT7aig
+k0AAAAASUVORK5CYII"/>
</g>
</svg>
I think renderers are free to scale images as they see fit so I don't
think this is a bug. The svg developers yahoo group is probably a
better forum for a generic how-to question like this. Maybe you could
use an feImage filter with a low filterRes to get what you want?
Best regards
Robert
Thanks for the suggestion, I might try that too. I also created an
index.html page with simply the text <img src="test.png" width="500"
height="500"> and it scaled the PNG and left it pixelated, so I
figured the embedded PNG in SVG would follow the same conventions.
<svg width="612pt" height="792pt" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
<g transform="translate(0,792) scale(1,-1)">
<text x="306" y="54.6" transform="scale(1,-1) translate(0,-792)"
fill="#000000"
style="font-size:12pt;font-family:monospace;text-
anchor:middle;">
Bitmap Test -- (5x5)
</text>
<rect x="10" y="10" width="592" height="694.8" fill="none"
style="stroke:black;stroke-width:1pt;"/>
<image x="20" y="20" width="572" height="674.8" filter="none"
preserveAspectRatio="none"
xmlns:xlink="http://www.w3.org/1999/xlink" xlink:show="embed"
image-rendering="optimizeSpeed"
I don't think so. But then image-rendering is only a hint. Even if we
implemented it, it might not do what you want.
Best regards
Robert