all frames from the animation to a temporary directory
This avoids lengthy delays when trying to render a specific frame
from the animation, as most animation formats require us to
iterate through all preceding frames in order to retrieve a specific
frame. By iterating once in advance and saving the results out we
gain instant access to any individual frame from the animation.
Instead of always defaulting to 100mb, then base the cache size
on the system memory:
- > 32gb, use 500mb
- 16-32gb, use 250mb
- else 100mb
The larger sizes can make a big difference to rendering speed for
complex projects, so let's let powerful systems utilise all that
memory!
(Only supported on linux for now)
This allows callers to specify the desired rendering resolution of the
image when they aren't explicitly requesting a preset image size.
It can be used for image drivers for formats which don't have a fixed
size (e.g. pdf) so that the image is rendered in the desired resolution.
This new class QgsImageCache is the equivalent of QgsSvgCache
but for raster images.
QgsImageCache stores pre-rendered resampled versions of raster
image files, allowing efficient reuse without incurring the
cost of resampling on every render.
Additionally, it offers the other benefits QgsSvgCache has,
such as thread safety, ability to transparently download remote
images, and support for base64 encoded strings.