|
From: | GNU bug Tracking System |
Subject: | [debbugs-tracker] bug#35843: closed (PNG warning: Interlace handling should be turned on when using png_read_image) |
Date: | Tue, 21 May 2019 15:57:01 +0000 |
Your message dated Tue, 21 May 2019 08:56:05 -0700 with message-id <address@hidden> and subject line PNG warning: Interlace handling should be turned on when using, png_read_image has caused the debbugs.gnu.org bug report #35843, regarding PNG warning: Interlace handling should be turned on when using png_read_image to be marked as done. (If you believe you have received this mail in error, please contact address@hidden) -- 35843: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=35843 GNU Bug Tracking System Contact address@hidden with problems
--- Begin Message ---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
--- End Message ---
--- Begin Message ---Subject: PNG warning: Interlace handling should be turned on when using, png_read_image Date: Tue, 21 May 2019 08:56:05 -0700 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. User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 0001-Pacify-libpng-on-interlaced-images-Bug-35843.patch
Description: Text Data
--- End Message ---
[Prev in Thread] | Current Thread | [Next in Thread] |