RE: Down sampling guidance for raster content in SVG.

Good idea.  Just tested it and that made no difference.

I suspect there isn't even the functionality internally available to better handle subsampling raster inside of SVG content; just for PNG.  That code base would need to be called to produce the subsampled SVG raster content before it is painted.

The bitonal PNG still looks super, and the same image embedded as RGB color space raster in an SVG looks horrible with a good percentage of the line-art pixels now whitespace.


From: Paul LeBeau []
Sent: Wednesday, April 02, 2014 18:02
To: Smailus, Thomas O
Subject: Re: Down sampling guidance for raster content in SVG.

Hi Thomas

Did you experiment with the "image-remdering" property to see if that had any effect?


On 3 April 2014 05:25, Smailus, Thomas O <<>> wrote:
In creating SVG versions of our current CGM sets of bitonal and grayscale graphics, we discovered that the way browsers implement their downsampling varies widely.

Specifically, IE and Firefox seem to just downsample by dropping rows and columns out of the raster content as they render the SVG.  Sometimes they do better with a PNG image, but not always (IE9 does very odd things - behaving differently if you directly zoom out with ctrl-'-' vs click on the image with the IE (+) and (-) magnifying glass first, which seem to take the PNG to a different behavior mode for later ctrl-'-' reduction in size).  Chrome does a good job and properly anti-aliases the SVG raster content as it reduces the size, converting the image to greyscale if it was bitonal by the looks of it.

The short of it is that IE and Mozilla are not usable for displaying SVG graphics containing line art raster content, if one has to reduce the size of the graphics into a smaller frame, as the artwork starts to disappear and become unrecognizable.

It may be worthwhile considering adding some guidance recommendations for SVG viewer implementations along the lines of it being recommended that SVG raster content be anti-aliased and internally stored and even rendered in a larger color space if necessary (eg bitonals become grayscale, etc) for the purposes of rendering the SVG.


Thomas Smailus
The Boeing Company

Received on Friday, 4 April 2014 20:29:06 UTC