This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.

View the commit online.

commit 820c5b2ebe59889f2147291e3b2fba12c113a6dd
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Mon Jan 1 21:47:09 2024 +0100

    PNG loader: Properly suppress messages from libpng
---
 src/modules/loaders/loader_png.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/modules/loaders/loader_png.c b/src/modules/loaders/loader_png.c
index a291bc1..2e5573a 100644
--- a/src/modules/loaders/loader_png.c
+++ b/src/modules/loaders/loader_png.c
@@ -115,9 +115,8 @@ comment_free(ImlibImage * im, void *data)
 static void
 user_error_fn(png_struct * png_ptr, const char *txt)
 {
-#if 0
    D("%s: %s\n", __func__, txt);
-#endif
+   longjmp(png_jmpbuf(png_ptr), 1);
 }
 
 static void
@@ -621,7 +620,8 @@ _save(ImlibImage * im)
    info_ptr = NULL;
    misc.data = ""
 
-   png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+   png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL,
+                                     user_error_fn, user_warning_fn);
    if (!png_ptr)
       return LOAD_FAIL;
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to