#pragma hdrstop
#endif
+#include "wx/defs.h"
+
+#if wxUSE_IMAGE
+
#include "wx/imagbmp.h"
#include "wx/bitmap.h"
#include "wx/debug.h"
if (bpp == 1)
{
int bit = 0;
- for (bit = 0; bit < 8; bit++)
+ for (bit = 0; bit < 8 && column < width; bit++)
{
index = ((aByte & (0x80 >> bit)) ? 1 : 0);
ptr[poffset] = cmap[index].r;
else
{
int nibble = 0;
- for (nibble = 0; nibble < 2; nibble++)
+ for (nibble = 0; nibble < 2 && column < width; nibble++)
{
index = ((aByte & (0xF0 >> nibble * 4)) >> (!nibble * 4));
if (index >= 16)
}
else
{
- for (int l = 0; l < first; l++)
+ for (int l = 0; l < first && column < width; l++)
{
ptr[poffset ] = cmap[aByte].r;
ptr[poffset + 1] = cmap[aByte].g;
#endif // wxUSE_STREAMS
-
+#endif // wxUSE_IMAGE