[Development] High-DPI 5.6 beta update

Olivier Goffart olivier at woboq.com
Tue Dec 15 21:56:18 CET 2015


On Tuesday 15. December 2015 20:53:22 Tim Blechmann wrote:
> >> Image { id: gicon source: qrc:/img/test.svg anchors.fill: parent
> >> }
> >> 
> >> Pro File:
> >> 
> >> QT += svg
> >> 
> >> Outside of the app, in the Android Manifext.xml and IOS, you need
> >> to provide pre-generated launcher PNG icons, but inside the app
> >> as well?
> >> 
> >> Your thoughts on projects that use ONLY SVG image resources and
> >> not PNG/JPEG?
> > 
> > But the above:
> > 
> > 1) already works
> 
> kind of ... the above will rasterize the svg for the resolution of the
> Image which is then upscaled, to match the resolution of the screen,
> resulting in a blurry rendering :/

What you describe is QTBUG-38991 which we fixed in Qt 5.5 already

> > 2) is limited to SVG Tiny (that is, whatever QtSvg support) 
> > 3) has terrible performances due to the rasterization (which has a huge
> > cost, happens entirely at runtime, and whose results are not
> > cached) 

We used svg for a mobile application. All the icons are in svg.  We thought it 
would be slow and was only done temporarily. But it turns out it is fast 
enough and not a bottleneck at all.
So in practice this work perfectly fine and we did not had to generate the png 
in several sizes.
So "terrible performances" is a bit of an overstatement.

> > 4) gives worse visual results than icons which were
> > produced by rasterizing SVG files, then having artists giving final
> > touches the output
> > 
> > Are you really sure you want to go down this path?

-- 
Olivier 

Woboq - Qt services and support - http://woboq.com - http://code.woboq.org




More information about the Development mailing list