You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Preview providers should take maxX and maxY into consideration #13607
The interface includes maX and maxY for a reason and yet, none of the providers use it.
A 5000x5000, 140MB TIFF is currently being converted to a 5000x5000 50MB PNG.
Fortunately, it will soon be possible to avoid multiple roundtrips to ImageMagick (via #13674) , but each resizing request of that 50MB PNG is still going to take some time (and waste memory) and that will only partially be fixed once #8196 is implemented.
Solution
Make sure preview providers take maxX and maxY into consideration when generating previews. With #13674 in place, each provider should only be called once.
I'm going to fix Bitmap, but the other providers should be fixed as well.
Yes, before the max preview, each provider would be queried for each request and thus provide a preview matching the asked dimension. Since they're now only use to generate the max preview, we need to make sure those previews keep the aspect ratio of the original image.
Activity
oparoz commentedon Jan 23, 2015
Job done for all files using the bitmap preview class: #13635
oparoz commentedon May 14, 2015
Re-opening, as the Image provider is not taking the max dimensions into consideration
oparoz commentedon May 18, 2015
Fix for all remaining providers is in #16382
PVince81 commentedon May 26, 2015
You tagged this as regression, so this worked before ?
oparoz commentedon May 26, 2015
Yes, before the max preview, each provider would be queried for each request and thus provide a preview matching the asked dimension. Since they're now only use to generate the max preview, we need to make sure those previews keep the aspect ratio of the original image.
DeepDiver1975 commentedon Jun 8, 2015
@oparoz we can close this now that #16382 is merged? THX
oparoz commentedon Jun 8, 2015
Yes, the API should now return the expected previews.
DeepDiver1975 commentedon Jun 8, 2015
awesome - thanks @oparoz for your contribution - very much welcome!