| Index: core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
|
| diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
|
| index 977abe1b7bb2de1b29def8e8fb488ca70c879629..f13b59450a068db86dae9206e355382a6221442f 100644
|
| --- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
|
| +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
|
| @@ -708,25 +708,22 @@ void CPDF_DIBSource::LoadJpxBitmap() {
|
| FX_DWORD height = 0;
|
| FX_DWORD codestream_nComps = 0;
|
| FX_DWORD image_nComps = 0;
|
| - pJpxModule->GetImageInfo(context->context(), width, height, codestream_nComps,
|
| - image_nComps);
|
| + pJpxModule->GetImageInfo(context->context(), &width, &height,
|
| + &codestream_nComps, &image_nComps);
|
| if ((int)width < m_Width || (int)height < m_Height)
|
| return;
|
|
|
| int output_nComps;
|
| - FX_BOOL bTranslateColor;
|
| FX_BOOL bSwapRGB = FALSE;
|
| if (m_pColorSpace) {
|
| if (codestream_nComps != (FX_DWORD)m_pColorSpace->CountComponents())
|
| return;
|
| output_nComps = codestream_nComps;
|
| - bTranslateColor = FALSE;
|
| if (m_pColorSpace == CPDF_ColorSpace::GetStockCS(PDFCS_DEVICERGB)) {
|
| bSwapRGB = TRUE;
|
| m_pColorSpace = nullptr;
|
| }
|
| } else {
|
| - bTranslateColor = TRUE;
|
| if (image_nComps) {
|
| output_nComps = image_nComps;
|
| } else {
|
| @@ -736,7 +733,6 @@ void CPDF_DIBSource::LoadJpxBitmap() {
|
| bSwapRGB = TRUE;
|
| } else if (output_nComps == 4) {
|
| m_pColorSpace = CPDF_ColorSpace::GetStockCS(PDFCS_DEVICECMYK);
|
| - bTranslateColor = FALSE;
|
| }
|
| m_nComponents = output_nComps;
|
| }
|
| @@ -765,7 +761,7 @@ void CPDF_DIBSource::LoadJpxBitmap() {
|
| context->output_offsets()[2] = 0;
|
| }
|
| if (!pJpxModule->Decode(context->context(), m_pCachedBitmap->GetBuffer(),
|
| - m_pCachedBitmap->GetPitch(), bTranslateColor,
|
| + m_pCachedBitmap->GetPitch(),
|
| context->output_offsets())) {
|
| m_pCachedBitmap.reset();
|
| return;
|
|
|