X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/72045d5768a126191a907bc640c28e81a11afdd6..ae901b234c4a0aa7c1777b3bd181dd7f8517ad21:/src/common/imaggif.cpp diff --git a/src/common/imaggif.cpp b/src/common/imaggif.cpp index 22a8dc04cc..7b241bd6e1 100644 --- a/src/common/imaggif.cpp +++ b/src/common/imaggif.cpp @@ -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