int bitsPerComponent = 1;
StreamColorSpaceMode csMode = streamCSNone;
+#if POPPLER_CHECK_VERSION(24, 12, 0)
+ bool hasAlpha;
+ str->getImageParams( &bitsPerComponent, &csMode, &hasAlpha );
+#else
str->getImageParams( &bitsPerComponent, &csMode );
+#endif
if( bitsPerComponent == 1 && (csMode == streamCSNone || csMode == streamCSDeviceGray) )
{
GfxRGB oneColor = { dblToCol( 1.0 ), dblToCol( 1.0 ), dblToCol( 1.0 ) };
std::unique_ptr<MemStream> pAlphaStr(new MemStream(reinterpret_cast<char *>(pSplashBitmap->getAlphaPtr()),
0, nBitmapWidth * nBitmapHeight, Object(objNull)));
auto aDecode = Object(objNull);
+#if POPPLER_CHECK_VERSION(24, 10, 0)
+ std::unique_ptr<GfxImageColorMap> pRgbIdentityColorMap(new GfxImageColorMap(8, &aDecode,
+ std::make_unique<GfxDeviceRGBColorSpace>()));
+ std::unique_ptr<GfxImageColorMap> pGrayIdentityColorMap(new GfxImageColorMap(8, &aDecode,
+ std::make_unique<GfxDeviceGrayColorSpace>()));
+#else
std::unique_ptr<GfxImageColorMap> pRgbIdentityColorMap(new GfxImageColorMap(8, &aDecode,
new GfxDeviceRGBColorSpace()));
std::unique_ptr<GfxImageColorMap> pGrayIdentityColorMap(new GfxImageColorMap(8, &aDecode,
new GfxDeviceGrayColorSpace()));
+#endif
OutputBuffer aBuf; initBuf(aBuf);
writePng_(aBuf, pRgbStr.get(), nBitmapWidth, nBitmapHeight, pRgbIdentityColorMap.get(),