Hi ~suv,
my apologies if my report was somewhat imprecise. Here is an update.
~suv <suv-sf@...16...>:
Please clarify: do you actually scale the vector objects and then export at 90 dpi [...], or do you refer to exporting to bitmap with various bitmap sizes, while keeping the SVG at the original size [...]?
The problem hit me first when doing a website logo in Inkscape which involves the pixelated character. Please see the header of
- I created an 1024x768px image
- *scaled* the character and the logo as I thought best
- and exported at 90dpi
This procedure of course made in no way sure that the "vector pixels" fell precisely on pixel grid lines in the exported PNG.
I don't see any interpolation artifacts - I do see antialiasing where the "vector pixels" (40x40px) do not fall on pixel grid lines in the exported PNG. [...] AFAIU the "bright grey" (lines) are antialiased edges of the vector squares (against the transparent background), not interpolation errors.
Ok, so it's antialiasing artefacts then. That's what I meant. Anyway, Inkscape could do a better job here. Naively spoken, the renderer should ignore the background if two rectangular shapes are touching.
Yes: export at bitmap sizes (or resolutions) where you know that the downscaled "vector pixels" fall precisely on pixel grid lines in the exported PNG. [...] Alternatively, use dimensions which are dividable by the number of rows and columns of "vector pixels" in the drawing
I did some testing, and you are right: once one does some math and adheres to the grid, it works. Still, this does not solve the aesthetic issues of exports of these kind of images at arbitrary scales.
Inkscape does not have an option to turn off antialiasing when exporting to bitmap (nor when rendering on-canvas) - and yes, this feature has been requested various times in the bug tracker.
I see. Thanks.
Bug #166252 "Cannot align boxes properly." https://bugs.launchpad.net/inkscape/+bug/166252
Bug #170356" Suppress antialiasing artefact at the object boundary" https://bugs.launchpad.net/inkscape/+bug/170356
Thanks for the pointer. I will follow these.
Regards, Florian