Union::LruImageCache Class

class Union::LruImageCache

An adaptation of LruCache for caching images. More...

Header: #include <LruImageCache>
CMake: find_package(Union REQUIRED)
target_link_libraries(mytarget PRIVATE Union::Union)
Inherits: Union::LruCache

Public Functions

QImage load(const std::filesystem::path &path, const QSizeF &size)

Detailed Description

This adds a load() method that makes it simple to use for caching images.

Member Function Documentation

QImage LruImageCache::load(const std::filesystem::path &path, const QSizeF &size)

Load an image at a given size.

This will return the image from \p path at \p size. The image will be cached and future calls to load() for the same path and size will return the cached image.