diff options
Diffstat (limited to 'core/fxcodec')
-rw-r--r-- | core/fxcodec/codec/fx_codec_progress.cpp | 7 | ||||
-rw-r--r-- | core/fxcodec/codec/include/ccodec_progressivedecoder.h | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/core/fxcodec/codec/fx_codec_progress.cpp b/core/fxcodec/codec/fx_codec_progress.cpp index bdb158f7ca..d63bdb895a 100644 --- a/core/fxcodec/codec/fx_codec_progress.cpp +++ b/core/fxcodec/codec/fx_codec_progress.cpp @@ -1286,7 +1286,8 @@ FX_BOOL CCodec_ProgressiveDecoder::DetectImageType( FXCODEC_STATUS CCodec_ProgressiveDecoder::LoadImageInfo( IFX_FileRead* pFile, FXCODEC_IMAGE_TYPE imageType, - CFX_DIBAttribute* pAttribute) { + CFX_DIBAttribute* pAttribute, + bool bSkipImageTypeCheck) { switch (m_status) { case FXCODEC_STATUS_FRAME_READY: case FXCODEC_STATUS_FRAME_TOBECONTINUE: @@ -1309,8 +1310,8 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::LoadImageInfo( m_startX = m_startY = 0; m_sizeX = m_sizeY = 0; m_SrcPassNumber = 0; - if (imageType != FXCODEC_IMAGE_UNKNOWN && - DetectImageType(imageType, pAttribute)) { + if (bSkipImageTypeCheck || (imageType != FXCODEC_IMAGE_UNKNOWN && + DetectImageType(imageType, pAttribute))) { m_imagType = imageType; m_status = FXCODEC_STATUS_FRAME_READY; return m_status; diff --git a/core/fxcodec/codec/include/ccodec_progressivedecoder.h b/core/fxcodec/codec/include/ccodec_progressivedecoder.h index 5774371ff1..5df2c4f733 100644 --- a/core/fxcodec/codec/include/ccodec_progressivedecoder.h +++ b/core/fxcodec/codec/include/ccodec_progressivedecoder.h @@ -47,7 +47,8 @@ class CCodec_ProgressiveDecoder { FXCODEC_STATUS LoadImageInfo(IFX_FileRead* pFile, FXCODEC_IMAGE_TYPE imageType, - CFX_DIBAttribute* pAttribute); + CFX_DIBAttribute* pAttribute, + bool bSkipImageTypeCheck); FXCODEC_IMAGE_TYPE GetType() const { return m_imagType; } int32_t GetWidth() const { return m_SrcWidth; } |