To be clear, what I suggested was to use the height and width unchanged
rather than multiplying by 4: that would improve the quality over the
current code while not blowing out the memory requirements of providing
huge images.

As a longer term solution to get images of the required quality, I
suggested the following on IRC:

We've got enough information on the back end to provide an image of the
proper size so it can be cropped to the desired dimensions without
scaling.  So the idea is to do something like this:

1. If the dash sees a URI like image://albumart, artistart or thumbnailer, add 
a crop=1 parameter to the end before using it as the source for the Image, and 
set sourceSize to the the cropped image dimensions.
2. In the image provider, if the crop parameter is included, interpret 
requestedSize as the desired crop dimensions rather than a bounding box.
3. return an image that can be cropped to those dimensions without scaling.

Qt already seems to handle the case when an image provider returns an
image larger than requestedSize, so I imagine this would work okay.

This is a bit of a hack, but no more so than the whole
CroppedImageMinimumSourceSize component.  I agree that it'd be nice if
Qt made it easier to load an image at an appropriate size to use with
PreserveAspectCrop.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1467740

Title:
  Lots of thumbnail requests with invalid size

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/thumbnailer/+bug/1467740/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to