GNU bug report logs - #35843
PNG warning: Interlace handling should be turned on when using png_read_image

Previous Next

Package: emacs;

Reported by: Taegil Bae <esrevinu <at> gmail.com>

Date: Tue, 21 May 2019 13:03:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Taegil Bae <esrevinu <at> gmail.com>
Subject: bug#35843: closed (PNG warning: Interlace handling should be
 turned on when using, png_read_image)
Date: Tue, 21 May 2019 15:57:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#35843: PNG warning: Interlace handling should be turned on when using png_read_image

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 35843 <at> debbugs.gnu.org.

-- 
35843: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=35843
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Taegil Bae <esrevinu <at> gmail.com>
Cc: 35843-done <at> debbugs.gnu.org
Subject: PNG warning: Interlace handling should be turned on when using,
 png_read_image
Date: Tue, 21 May 2019 08:56:05 -0700
[Message part 3 (text/plain, inline)]
Thanks for reporting the problem. It's not clear why interlace handling 
needs to be enabled manually when GNU Emacs will merely read the whole 
image (isn't libpng smart enough to do that on its own?) but I guess 
it's better to pacify libpng, if only to prevent users from worrying. I 
installed the attached patch.

[0001-Pacify-libpng-on-interlaced-images-Bug-35843.patch (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Taegil Bae <esrevinu <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: PNG warning: Interlace handling should be turned on when using
 png_read_image
Date: Tue, 21 May 2019 22:01:38 +0900
Hi,

I got the following warning in Messages buffer:
PNG warning: Interlace handling should be turned on when using png_read_image

This is caused by the spacemacs log, which is an interlaced png image.
According to
the libpng source code, a caller to png_read_update_info(),
png_read_image() has to
turn on interlace handling. After I patched emacs source code as below,
the PNG waring disappeared:
diff --git a/src/image.c b/src/image.c
index 35ca3e2d66d..e0f6bbcc581 100644
--- a/src/image.c
+++ b/src/image.c
@@ -6214,6 +6214,8 @@ png_load_body (struct frame *f, struct image
*img, struct png_load_context *c)
     }

   /* Update info structure.  */
+  if (png_get_interlace_type(png_ptr, info_ptr) != PNG_INTERLACE_NONE)
+    png_set_interlace_handling(png_ptr);
   png_read_update_info (png_ptr, info_ptr);

   /* Get number of channels.  Valid values are 1 for grayscale images

Best regards,

Taegil



This bug report was last modified 6 years and 64 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.