summaryrefslogtreecommitdiff
path: root/image/image.c
diff options
context:
space:
mode:
Diffstat (limited to 'image/image.c')
-rw-r--r--image/image.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/image/image.c b/image/image.c
index 779826a17..fb8197b28 100644
--- a/image/image.c
+++ b/image/image.c
@@ -16,6 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <assert.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
@@ -23,6 +24,7 @@
#include "utils/errors.h"
#include "image/image.h"
+#include "image/image_cache.h"
#include "image/bmp.h"
#include "image/gif.h"
#include "image/ico.h"
@@ -45,6 +47,10 @@ nserror image_init(void)
{
nserror error;
+ error = image_cache_init();
+ if (error != NSERROR_OK)
+ return error;
+
#ifdef WITH_BMP
error = nsbmp_init();
if (error != NSERROR_OK)
@@ -158,5 +164,8 @@ void image_fini(void)
#ifdef WITH_WEBP
webp_fini();
#endif
+
+ /* dump any remaining cache entries */
+ image_cache_fini();
}