X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b5f62a0b2db198609b45dec622a018dae37008e..ec35ed7c1cddff0638eba60af28e69d1e6ab46a2:/src/common/imagbmp.cpp diff --git a/src/common/imagbmp.cpp b/src/common/imagbmp.cpp index 010c34084a..1ba36f910c 100644 --- a/src/common/imagbmp.cpp +++ b/src/common/imagbmp.cpp @@ -20,7 +20,7 @@ #include "wx/defs.h" -#if wxUSE_IMAGE && wxUSE_STREAMS +#if wxUSE_IMAGE #include "wx/imagbmp.h" #include "wx/bitmap.h" @@ -52,6 +52,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxBMPHandler,wxImageHandler) +#if wxUSE_STREAMS + #ifndef BI_RGB #define BI_RGB 0 #define BI_RLE8 1 @@ -964,6 +966,8 @@ bool wxBMPHandler::DoCanRead(wxInputStream& stream) return hdr[0] == 'B' && hdr[1] == 'M'; } +#endif // wxUSE_STREAMS + #if wxUSE_ICO_CUR //----------------------------------------------------------------------------- @@ -972,6 +976,8 @@ bool wxBMPHandler::DoCanRead(wxInputStream& stream) IMPLEMENT_DYNAMIC_CLASS(wxICOHandler, wxBMPHandler) +#if wxUSE_STREAMS + struct ICONDIRENTRY { wxUint8 bWidth; // Width of the image @@ -1288,6 +1294,7 @@ bool wxICOHandler::DoCanRead(wxInputStream& stream) return hdr[0] == '\0' && hdr[1] == '\0' && hdr[2] == '\1' && hdr[3] == '\0'; } +#endif // wxUSE_STREAMS //----------------------------------------------------------------------------- @@ -1296,6 +1303,8 @@ bool wxICOHandler::DoCanRead(wxInputStream& stream) IMPLEMENT_DYNAMIC_CLASS(wxCURHandler, wxICOHandler) +#if wxUSE_STREAMS + bool wxCURHandler::DoCanRead(wxInputStream& stream) { stream.SeekI(0); @@ -1307,12 +1316,16 @@ bool wxCURHandler::DoCanRead(wxInputStream& stream) return hdr[0] == '\0' && hdr[1] == '\0' && hdr[2] == '\2' && hdr[3] == '\0'; } +#endif // wxUSE_STREAMS + //----------------------------------------------------------------------------- // wxANIHandler //----------------------------------------------------------------------------- IMPLEMENT_DYNAMIC_CLASS(wxANIHandler, wxCURHandler) +#if wxUSE_STREAMS + bool wxANIHandler::LoadFile(wxImage *image, wxInputStream& stream, bool verbose, int index) { @@ -1470,6 +1483,8 @@ int wxANIHandler::GetImageCount(wxInputStream& stream) return wxNOT_FOUND; } +#endif // wxUSE_STREAMS + #endif // wxUSE_ICO_CUR -#endif // wxUSE_IMAGE && wxUSE_STREAMS +#endif // wxUSE_IMAGE