aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend_libpng.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend_libpng.c b/src/backend_libpng.c
index ef94028..53ed87f 100644
--- a/src/backend_libpng.c
+++ b/src/backend_libpng.c
@@ -96,6 +96,9 @@ static enum backend_result open_path(const char *path, struct imv_source **src)
return BACKEND_UNSUPPORTED;
}
+ /* set max PNG chunk size to 50MB, instead of 8MB default */
+ png_set_chunk_malloc_max(private->png, 1024 * 1024 * 50);
+
private->info = png_create_info_struct(private->png);
if (!private->info) {
png_destroy_read_struct(&private->png, NULL, NULL);