mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-10 18:05:41 +08:00
Fix bug 69723
This commit is contained in:
@ -108,7 +108,13 @@ Aggplus::CImage* ConvertMetafile(NSFonts::IApplicationFonts* pAppFonts, const st
|
||||
if (NULL == pMeta || !pMeta->LoadFromFile(wsPath.c_str()))
|
||||
return new Aggplus::CImage(wsPath);
|
||||
|
||||
if (0 < dWidth || 0 < dHeight)
|
||||
bool bUseMax = false;
|
||||
if (dWidth > 5000 || dHeight > 5000)
|
||||
bUseMax = true;
|
||||
else if (dWidth <= 0 && dHeight <= 0)
|
||||
bUseMax = true;
|
||||
|
||||
if (!bUseMax)
|
||||
pMeta->ConvertToRaster(wsTempDirectory.c_str(), _CXIMAGE_FORMAT_PNG, MM_2_PT(dWidth), MM_2_PT(dHeight));
|
||||
else
|
||||
MetaFile::ConvertToRasterMaxSize(pMeta, wsTempDirectory.c_str(), _CXIMAGE_FORMAT_PNG, 2000);
|
||||
|
||||
Reference in New Issue
Block a user