There is a QSvgRenderer
class in QtSvg
module which can render image onto QPaintDevice
. This one can be QImage
. In that case we will create:
Image svgBufferImage(renderer.defaultSize(), QImage::Format_ARGB32);
But how to render to a QImage
of different size than default from the SVG renderer? Since the SVG format image can be scaled without quality loss, is it possible to generate static images, like PNG, from SVG files using QSvgRenderer
?
Does anyone have a better idea? Basically I need to create images like PNG from SVG files in different sizes.