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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35843 in the body.
You can then email your comments to 35843 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#35843; Package emacs. (Tue, 21 May 2019 13:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Taegil Bae <esrevinu <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 21 May 2019 13:03:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

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




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Tue, 21 May 2019 15:57:01 GMT) Full text and rfc822 format available.

Notification sent to Taegil Bae <esrevinu <at> gmail.com>:
bug acknowledged by developer. (Tue, 21 May 2019 15:57:02 GMT) Full text and rfc822 format available.

Message #10 received at 35843-done <at> debbugs.gnu.org (full text, mbox):

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 1 (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)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 19 Jun 2019 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 307 days ago.

Previous Next


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