all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Taegil Bae <esrevinu@gmail.com>
To: 35843@debbugs.gnu.org
Subject: bug#35843: PNG warning: Interlace handling should be turned on when using png_read_image
Date: Tue, 21 May 2019 22:01:38 +0900	[thread overview]
Message-ID: <CA+k_chLC02nzhYb2qoy+yUADqg2bdZNjGfRdBRzHHuBjyOhLSA@mail.gmail.com> (raw)

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	other threads:[~2019-05-21 13:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-21 13:01 Taegil Bae [this message]
2019-05-21 15:56 ` bug#35843: PNG warning: Interlace handling should be turned on when using, png_read_image Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+k_chLC02nzhYb2qoy+yUADqg2bdZNjGfRdBRzHHuBjyOhLSA@mail.gmail.com \
    --to=esrevinu@gmail.com \
    --cc=35843@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.