fixed bug for 24bit images

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Guillermo Rodriguez Garcia
1999-08-29 20:02:07 +00:00
parent ba7c80a26c
commit f0d922cf78

View File

@@ -142,14 +142,17 @@ int ReadPCX(wxImage *image, wxInputStream& stream)
// palette at the end of the file. Read it now before
// proceeding.
//
pos = stream.TellI();
stream.SeekI(-769, wxFromEnd);
if (format == IMAGE_8BIT)
{
pos = stream.TellI();
stream.SeekI(-769, wxFromEnd);
if (stream.GetC() != 12)
return E_FORMATO;
if (stream.GetC() != 12)
return E_FORMATO;
stream.Read(pal, 768);
stream.SeekI(pos, wxFromStart);
stream.Read(pal, 768);
stream.SeekI(pos, wxFromStart);
}
// Allocate memory for a scanline and resize the image.
//