summaryrefslogtreecommitdiff
path: root/core/fxcodec
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcodec')
-rw-r--r--core/fxcodec/codec/ccodec_jpegmodule.h4
-rw-r--r--core/fxcodec/codec/fx_codec_jpeg.cpp9
2 files changed, 2 insertions, 11 deletions
diff --git a/core/fxcodec/codec/ccodec_jpegmodule.h b/core/fxcodec/codec/ccodec_jpegmodule.h
index aed01bda9b..06cd2242c2 100644
--- a/core/fxcodec/codec/ccodec_jpegmodule.h
+++ b/core/fxcodec/codec/ccodec_jpegmodule.h
@@ -45,9 +45,7 @@ class CCodec_JpegModule {
std::unique_ptr<Context> Start();
void Input(Context* pContext, const uint8_t* src_buf, uint32_t src_size);
-#ifndef PDF_ENABLE_XFA
- int ReadHeader(Context* pContext, int* width, int* height, int* nComps);
-#else // PDF_ENABLE_XFA
+#ifdef PDF_ENABLE_XFA
int ReadHeader(Context* pContext,
int* width,
int* height,
diff --git a/core/fxcodec/codec/fx_codec_jpeg.cpp b/core/fxcodec/codec/fx_codec_jpeg.cpp
index 7a73f4e55e..f0b8d66d3a 100644
--- a/core/fxcodec/codec/fx_codec_jpeg.cpp
+++ b/core/fxcodec/codec/fx_codec_jpeg.cpp
@@ -451,12 +451,6 @@ int CCodec_JpegModule::ReadHeader(Context* pContext,
int* height,
int* nComps,
CFX_DIBAttribute* pAttribute) {
-#else // PDF_ENABLE_XFA
-int CCodec_JpegModule::ReadHeader(Context* pContext,
- int* width,
- int* height,
- int* nComps) {
-#endif // PDF_ENABLE_XFA
auto* ctx = static_cast<CJpegContext*>(pContext);
int ret = jpeg_read_header(&ctx->m_Info, true);
if (ret == JPEG_SUSPENDED)
@@ -467,11 +461,10 @@ int CCodec_JpegModule::ReadHeader(Context* pContext,
*width = ctx->m_Info.image_width;
*height = ctx->m_Info.image_height;
*nComps = ctx->m_Info.num_components;
-#ifdef PDF_ENABLE_XFA
JpegLoadAttribute(&ctx->m_Info, pAttribute);
-#endif
return 0;
}
+#endif // PDF_ENABLE_XFA
bool CCodec_JpegModule::StartScanline(Context* pContext, int down_scale) {
auto* ctx = static_cast<CJpegContext*>(pContext);