On Wed, 2013-04-03 at 14:38 +0200, Jasper van de Gronde wrote:
On 03-04-13 13:25, Tavmjong Bah wrote:
... I've just had a quick look at how the web browsers and Batik handle bitmap scaling. When scaling up they all smooth the bitmaps.I This seems to be what the SVG 1.1 spec requires. There is no provision for turning this off, the closest is to set the 'image-rendering' value to 'optimizeSpeed'.
It has been proposed in CSS to take the SVG 'image-rendering' property and add new values. Currently Firefox and Opera support the value 'crisp-edges'. See:
https://developer.mozilla.org/en-US/docs/CSS/image-rendering
It doesn't appear that anybody supports in inside SVG (only in HTML).
Would it make sense to start supporting this in Inkscape? Obviously support in other renderers would be absent (at least for now), but as it is mostly a hint anyway... Put differently, if our choice is between adding a global preference for Inkscape that toggles between resampling methods and adding support for image-rendering with crisp-edges and/or pixelated, what would be preferable?
Adding a global toggle is not a good idea. Our SVG would then never be rendered the same as by others. Using image-rendering is a much better solution.
BTW, just to be clear, I'm assuming that these values live purely in the CSS domain (and even there are not standardized, yet), and would thus have to live in the style attribute.
I have asked that this topic be added to the agenda for tomorrow's SVG working group meeting. If it receives a favorable response, we can then add it with the "-inkscape" prefix. Once the standard is approved, we can then remove the prefix. This avoids half the problem we face with flowed text.
This brings up the question of how to handle SVG2/CSS3/etc. features in general. I have a proposal but don't have time at the moment to write it all out.
Tav