How can I scale the SVG <image> while saving whole pixels?

I have a pixel style image that is designed to scale to 4x using SVG. However, the following code blurs image pixels:

<image x="0" y="0" width="1024" height="1024"
    image-rendering="optimizeSpeed"
    xlink:href="pixelart.bmp" />

Is there any attribute that will allow this?

+5
source share
1 answer

, image-rendering="optimizeSpeed" , . , , , , , , ". , " ", , .

, , - IE9 -ms-interpolation-mode:nearest-neighbor. () IE CSS (, HTML).

OS// ?


, HTML5 Canvas SVG, SVG <rect> :
http://phrogz.net/tmp/canvas_image_zoom_svg.xhtml

+5

All Articles