diff --git a/src/common/image.cpp b/src/common/image.cpp index d261424034..02df26fdd9 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -1594,7 +1594,7 @@ bool wxImage::LoadFile( wxInputStream& stream, long type, int index ) return false; } - if (!handler->CanRead(stream)) + if (stream.IsSeekable() && !handler->CanRead(stream)) { wxLogError(_("Image file is not of type %d."), type); return false; @@ -1618,7 +1618,7 @@ bool wxImage::LoadFile( wxInputStream& stream, const wxString& mimetype, int ind return false; } - if (!handler->CanRead(stream)) + if (stream.IsSeekable() && !handler->CanRead(stream)) { wxLogError(_("Image file is not of type %s."), (const wxChar*) mimetype); return false;