mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
ImageCollection animations
This commit is contained in:
@@ -34,6 +34,11 @@ GifDecoder::~GifDecoder() {
|
||||
}
|
||||
|
||||
bool GifDecoder::readHeader() {
|
||||
if (m_frame_count > 1 /* if true, it means readHeader() was called before */)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!m_buf.empty()) {
|
||||
if (!m_strm.open(m_buf)) {
|
||||
return false;
|
||||
|
||||
@@ -249,6 +249,11 @@ void PngDecoder::readDataFromBuf( void* _png_ptr, unsigned char* dst, size_t si
|
||||
|
||||
bool PngDecoder::readHeader()
|
||||
{
|
||||
if (m_frame_count > 1 /* if true, it means readHeader() was called before */)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Declare dynamic variables before a potential longjmp.
|
||||
Chunk chunk;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user