[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#65496: 30.0.50; Issue with the regexp used to auto-detect PBM image
From: |
Eli Zaretskii |
Subject: |
bug#65496: 30.0.50; Issue with the regexp used to auto-detect PBM image data |
Date: |
Wed, 06 Sep 2023 19:00:28 +0300 |
> Date: Wed, 6 Sep 2023 16:05:39 +0200
> Cc: 65496@debbugs.gnu.org
> From: David Ponce <da_vid@orange.fr>
>
> >> Maybe for the use case of auto-detecting image type from image data,
> >> my proposed patch to replace character class by a list of unambiguous
> >> explicit character values in the regexp could make sense?
> >
> > Yes, it makes sense, but are you sure you mention there all the
> > characters that can happen in PBM images, and only those characters?
>
> Yes, according to the specification of pbm available at
> <https://netpbm.sourceforge.net/doc/pbm.html>:
>
> "Each PBM image consists of the following:
>
> * A "magic number" for identifying the file type.
> A pbm image's magic number is the two characters "P4".
>
> ==> * Whitespace (blanks, TABs, CRs, LFs). <==
>
> * The width in pixels of the image, formatted as ASCII characters in
> decimal.
>
> ..."
Thanks, I've now installed your patch on the emacs-29 branch, and I'm
closing this bug.