unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Andy Moreton <andrewjmoreton@gmail.com>
To: 28824@debbugs.gnu.org
Subject: bug#28824: 26.0.90; display of pbm images broken?
Date: Sat, 14 Oct 2017 20:03:27 +0100	[thread overview]
Message-ID: <86h8v18scg.fsf@gmail.com> (raw)
In-Reply-To: <29226.45866.855134.23009@gargle.gargle.HOWL>

On Sat 14 Oct 2017, Andy Moreton wrote:

> On Sat 14 Oct 2017, Eli Zaretskii wrote:
>
>>> From: Andy Moreton <andrewjmoreton@gmail.com>
>>> Date: Sat, 14 Oct 2017 16:01:20 +0100
>>> 
>>> I see problems with some PBM files from etc/images with emacs 26.0.90 on
>>> Windows. The ones that don't work appear to be those that contain a
>>> Netpbm header, e.g. back-arrow.pbm close.pbm cut.pbm fwd-arrow.pbm
>>> home.pbm
>>
>> I see no problems with those images you mention as problematic.
>>
>> Could it be a problem specific to 64-bit builds?
>
> I've tried this in a 32bit MinGW build with the same results. It appears
> to be a problem with the pbm entry in image-type-header-regexps, as
> doing (setq image-type-header-regexps '(("\\`P[1-6]" . pbm))) results in
> the problematic images displaying correctly.
>
>     AndyM

The file format is described at http://netpbm.sourceforge.net/doc/pbm.html

Further testing with the images from etc/images in emacs 26 shows that
this patch appears to fix the problem:

diff --git a/lisp/image.el b/lisp/image.el
index 1d0776180b..32df508bc8 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -34,8 +34,8 @@ 'image-refresh
 (defconst image-type-header-regexps
   `(("\\`/[\t\n\r ]*\\*.*XPM.\\*/" . xpm)
     ("\\`P[1-6]\\(?:\
-\\(?:\\(?:#[^\r\n]*[\r\n]\\)?[[:space:]]\\)+\
-\\(?:\\(?:#[^\r\n]*[\r\n]\\)?[0-9]\\)+\
+\\(?:\\(?:#[^\r\n]*[\r\n]\\)*[[:space:]]\\)+\
+\\(?:\\(?:#[^\r\n]*[\r\n]\\)*[0-9]\\)+\
 \\)\\{2\\}" . pbm)
     ("\\`GIF8[79]a" . gif)
     ("\\`\x89PNG\r\n\x1a\n" . png)






  reply	other threads:[~2017-10-14 19:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-14  2:10 bug#28824: 26.0.90; display of pbm images broken? Roland Winkler
2017-10-14  7:01 ` Eli Zaretskii
2017-10-14 15:01   ` Andy Moreton
2017-10-14 15:31     ` Eli Zaretskii
2017-10-14 18:16       ` Andy Moreton
2017-10-14 19:03         ` Andy Moreton [this message]
2017-10-14 19:16           ` Eli Zaretskii
2017-10-14 19:50             ` Andy Moreton
2017-10-14 20:15               ` Andy Moreton
2017-10-14 19:14         ` Eli Zaretskii
2017-10-14 21:52   ` Roland Winkler
2017-10-15 17:42     ` Andy Moreton
2017-10-15 18:49       ` Eli Zaretskii
2017-10-16  8:30         ` Paul Eggert
2017-10-16 15:11           ` Eli Zaretskii
2017-10-16 15:22             ` Roland Winkler

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=86h8v18scg.fsf@gmail.com \
    --to=andrewjmoreton@gmail.com \
    --cc=28824@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).