// constructor, destructor, etc.
wxIFFDecoder(wxInputStream *s);
~wxIFFDecoder() { Destroy(); }
+
+ // NOTE: this function modifies the current stream position
bool CanRead();
+
int ReadIFF();
bool ConvertToImage(wxImage *image) const;
};
if ( !m_f->Read(buf, WXSIZEOF(buf)) )
return false;
- if ( m_f->SeekI(-(wxFileOffset)WXSIZEOF(buf), wxFromCurrent) == wxInvalidOffset )
- return false;
-
return (memcmp(buf, "FORM", 4) == 0) && (memcmp(buf+8, "ILBM", 4) == 0);
}
wxOutputStream& WXUNUSED(stream), bool verbose)
{
if (verbose)
+ {
wxLogDebug(wxT("IFF: the handler is read-only!!"));
+ }
return false;
}
wxIFFDecoder decod(&stream);
return decod.CanRead();
+ // it's ok to modify the stream position here
}
#endif // wxUSE_STREAMS