[Development] Image and PreserveAspectCrop

Shawn Rutledge Shawn.Rutledge at qt.io
Tue Aug 2 17:47:35 CEST 2016


> On 02 Aug 2016, at 13:56, Gunnar Sletta <gunnar at sletta.org> wrote:
> 
> A bit unfortunate that we have to add a V2 version of the image provider, though. Would be nice if we could extend what is already there somehow. However you end up solving it, it needs to be a bit more flexible than what you do in the proposed patch, as you also have to cover PreserveAspectFit. Perhaps using some flags as the last parameter there instead of a bool so we keep it open to add other states later on without having to introduce a new class. 

I wanted to introduce PDF as an image format soon, but don’t have time to finish up the loose ends right now.  Handling scaling is of course critical, because you don’t want to re-render pages too often, but you need to re-render them when the scale changes too much.  I found a few things to be dissatisfied about, both in how image plugins work, in how QtQuick handles scalable images, in how it handles frames of multi-page images, etc.; so I think changes will be needed in various places, but it needs more thought and coordination some time past 5.8.  My point is that if API changes become necessary, we can find other itches to scratch when we do that.  ;-)



More information about the Development mailing list