diff --git a/samples/image/image.cpp b/samples/image/image.cpp index 819da2578f..00380c9a73 100644 --- a/samples/image/image.cpp +++ b/samples/image/image.cpp @@ -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