From: Ethan A M. <me...@uw...> - 2023-06-19 07:36:48
|
On Sunday, 18 June 2023 23:55:07 PDT Dima Kogan wrote: > Ethan A Merritt <me...@uw...> writes: > > > As tested here those attributes are indeed honored by firefox and chrome. > > Mixed success on other svg handling programs. > > I'm guessing that adding support for either image-rendering=crips-edge > or image-rendering=pixelated into librsvg and QSvg would make all of > these work. But it looks like these two libraries simply don't support > either option yet. I looked into it a bit further. The thing is, the two hinting properties you found are not part of the SVG standard (version 2). They are instead CSS style hints to the browser. Chrome and Firefox apparently dive into an included SVG file and extract the CSS style hints from there. SVG-aware programs that are not browsers, like inkscape or gimp, could do the same but the motivation for doing so would come from imitating Chrome or Firefox rather than adhering to the SVG standard. Inkscape does, but gimp doesn't. > I'll file feature-request bug reports for those two projects. > But the patch should probably still go in: supporting firefox and chrome > is much better than supporting nothing. For me personally, the support from inkscape is just as important as from the browsers. I use it to prepare figures for publication. And it's still true that you can work around this by using "with image pixels" for gnuplot heat maps. What about lobbying the SVG working group to add an equivalent to the SVG spec? All the various support libraries would then eventually fall in line. As of SVG 2.0 you only get a choice between "optimizeSpeed" and "optimizeQuality", both of which are so vague as to be useless for our purpose. https://svgwg.org/svg2-draft/painting.html#ImageRendering |