Fix building image sample with wxUSE_PALETTE==0
This commit is contained in:
parent
8b2f413b42
commit
a5934f33e2
@ -258,7 +258,9 @@ private:
|
||||
wxBMP_8BPP,
|
||||
wxBMP_8BPP_GREY,
|
||||
wxBMP_8BPP_RED,
|
||||
#if wxUSE_PALETTE
|
||||
wxBMP_8BPP_PALETTE,
|
||||
#endif // wxUSE_PALETTE
|
||||
wxBMP_24BPP
|
||||
};
|
||||
|
||||
@ -270,7 +272,9 @@ private:
|
||||
"8 bpp color",
|
||||
"8 bpp greyscale",
|
||||
"8 bpp red",
|
||||
#if wxUSE_PALETTE
|
||||
"8 bpp own palette",
|
||||
#endif // wxUSE_PALETTE
|
||||
"24 bpp"
|
||||
};
|
||||
|
||||
@ -283,7 +287,7 @@ private:
|
||||
{
|
||||
int format = bppvalues[bppselection];
|
||||
image.SetOption(wxIMAGE_OPTION_BMP_FORMAT, format);
|
||||
|
||||
#if wxUSE_PALETTE
|
||||
if ( format == wxBMP_8BPP_PALETTE )
|
||||
{
|
||||
unsigned char *cmap = new unsigned char [256];
|
||||
@ -293,6 +297,7 @@ private:
|
||||
|
||||
delete[] cmap;
|
||||
}
|
||||
#endif // wxUSE_PALETTE
|
||||
}
|
||||
}
|
||||
#if wxUSE_LIBPNG
|
||||
|
Loading…
Reference in New Issue
Block a user