implement GetImageCount() for GIF handler (closes #10663); added test for it to the sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60029 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -100,6 +100,16 @@ bool wxGIFHandler::DoCanRead( wxInputStream& stream )
|
||||
return decod.CanRead(stream);
|
||||
}
|
||||
|
||||
int wxGIFHandler::GetImageCount( wxInputStream& stream )
|
||||
{
|
||||
wxGIFDecoder decod;
|
||||
wxGIFErrorCode error = decod.LoadGIF(stream);
|
||||
if ( (error != wxGIF_OK) && (error != wxGIF_TRUNCATED) )
|
||||
return -1;
|
||||
|
||||
return decod.GetFrameCount();
|
||||
}
|
||||
|
||||
#endif // wxUSE_STREAMS
|
||||
|
||||
#endif // wxUSE_GIF
|
||||
|
||||
Reference in New Issue
Block a user