Compare SVG rasterizers

Render the same SVG with each of QIP’s SVG rasterizer components and compare the results. Edit the SVG, choose a component, and the image renders again in your browser. Nothing is uploaded.

Component

The time shown is one render call on an already compiled and instantiated module. The first render of each component also downloads and compiles it. Width and height of zero use the SVG’s own size. The RGBA32F output is converted from linear light to sRGB for display.

Components #

ComponentRendererOutputSizeMemory limitText
SkiaSkia CPU, analytic coverageRGBA8 sRGB KTX23439.89 kB544 MiBTrueType, OpenType, WOFF, or WOFF2 fonts sent as multipart/related parts; this page sends Inter Display Regular and Bold
ThorVGThorVG CPU scan converterRGBA8 sRGB KTX2281.83 kB512 MiBNone
QIP SIMD, linear light4 by 4 sample gridRGBA32F linear BT.709 KTX2318.64 kB512 MiBInter Display Regular and Bold outlines
QIP SIMD4 by 4 sample gridRGBA8 sRGB KTX2316.82 kB512 MiBInter Display Regular and Bold outlines
QIP center-sampledOne sample per pixelRGBA8 sRGB KTX2289.27 kB128 MiBInter Display Regular and Bold outlines
QIP center-sampled BMPOne sample per pixelB8G8R8A8 sRGB BMP289.10 kB128 MiBInter Display Regular and Bold outlines

Skia accepts up to 32 MiB of SVG and fonts together; the others accept up to 1 MiB of SVG. All output at most 8192 pixels per side and 25 million pixels in total. None of them load external resources. The BMP component has no width or height uniform.

Choosing one #

  • Skia has the broadest SVG support, including masks, filters, and <text>. It is by far the largest download.
  • ThorVG covers a broad SVG paint model with antialiased edges at a fraction of Skia’s size, but it does not render text.
  • QIP SIMD, linear light keeps floating-point linear-light output for later linear-light stages.
  • QIP SIMD uses the same antialiasing and quantizes to RGBA8.
  • QIP center-sampled uses the least memory and takes one sample per pixel, so edges are not antialiased.

The QIP rasterizers support a limited SVG subset: rect (including rx and ry), circle, line, path, polygon, polyline, text, and g elements with transforms, solid colors, linear and radial gradients, opacity, fill-opacity, and stroke-opacity. Text is always drawn with Inter Display, whatever font-family says. They use the current_color_rgba uniform for currentColor instead of the CSS color property, ignore the style attribute, approximate arcs with straight segments, and draw every stroke with round caps and joins. Group opacity is applied to each child separately, so overlapping children show through each other.

Run with Node.js and qipx #

qipx runs the same components locally:

npx @qip.dev/qipx qip.dev run -i drawing.svg \
  -F 'regular=@InterDisplay-Regular.ttf;type=font/ttf' \
  -F 'bold=@InterDisplay-Bold.ttf;type=font/ttf' \
  image/svg+xml/svg-rasterize-skia-with-fonts-to-ktx2-r8g8b8a8-srgb.wasm \
  -u width=640 -u height=400 > drawing.ktx2

Replace the component path to try a different rasterizer. The others take plain SVG, so drop the -F fonts for them.