From cdf0ff0ff1dc0a587fe1d304653cddcc3e6f7432 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 11 Sep 2005 11:18:36 +0000 Subject: [PATCH] accept grey PNM images (patch 1285885) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/imagpnm.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/common/imagpnm.cpp b/src/common/imagpnm.cpp index a7775d2a29..74bf466b04 100644 --- a/src/common/imagpnm.cpp +++ b/src/common/imagpnm.cpp @@ -172,10 +172,12 @@ bool wxPNMHandler::DoCanRead( wxInputStream& stream ) if ( stream.GetC() == 'P' ) { - switch (stream.GetC()) + switch ( stream.GetC() ) { - case '3': - case '6': + case '2': // ASCII Grey + case '3': // ASCII RGB + case '5': // RAW Grey + case '6': // RAW RGB return true; } } -- 2.45.2