Warning, /graphics/krita/3rdparty/ext_qt/0001-Remove-chunk-size-limits.patch is written in an unsupported language. File is not indexed.
0001 From ab2264e36be63ddc886f37441ec3263f0b5ccdc8 Mon Sep 17 00:00:00 2001 0002 From: Halla Rempt <halla@valdyas.org> 0003 Date: Wed, 30 Dec 2020 10:54:08 +0100 0004 Subject: [PATCH 42/43] Remove chunk size limits 0005 0006 --- 0007 src/gui/image/qpnghandler.cpp | 12 ++++++++++++ 0008 1 file changed, 12 insertions(+) 0009 0010 diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp 0011 index e7e998efd1..751ae4f043 100644 0012 --- a/src/gui/image/qpnghandler.cpp 0013 +++ b/src/gui/image/qpnghandler.cpp 0014 @@ -542,6 +542,12 @@ bool QPngHandlerPrivate::readPngHeader() 0015 0016 png_set_error_fn(png_ptr, 0, 0, qt_png_warning); 0017 0018 +#ifdef PNG_SET_USER_LIMITS_SUPPORTED 0019 + /* Remove the user limits, if any */ 0020 + png_set_chunk_cache_max(png_ptr, 0); 0021 + png_set_chunk_malloc_max(png_ptr, 0); 0022 +#endif 0023 + 0024 #if defined(PNG_SET_OPTION_SUPPORTED) && defined(PNG_MAXIMUM_INFLATE_WINDOW) 0025 // Trade off a little bit of memory for better compatibility with existing images 0026 // Ref. "invalid distance too far back" explanation in libpng-manual.txt 0027 @@ -831,6 +837,12 @@ bool QPNGImageWriter::writeImage(const QImage& image, volatile int compression_i 0028 0029 png_set_error_fn(png_ptr, 0, 0, qt_png_warning); 0030 0031 +#ifdef PNG_SET_USER_LIMITS_SUPPORTED 0032 + /* Remove the user limits, if any */ 0033 + png_set_chunk_cache_max(png_ptr, 0); 0034 + png_set_chunk_malloc_max(png_ptr, 0); 0035 +#endif 0036 + 0037 info_ptr = png_create_info_struct(png_ptr); 0038 if (!info_ptr) { 0039 png_destroy_write_struct(&png_ptr, 0); 0040 -- 0041 2.20.1.windows.1 0042