Вот мой сценарий: < /p>
const puppeteer = require('puppeteer');
const readline = require('readline');
const fs = require('fs');
const path = require('path');
(async () => {
const browser = await puppeteer.launch({ headless: false, devtools: true });
const page = await browser.newPage();
// Set a high resolution and scale factor
await page.setViewport({ width: 1920, height: 1080, deviceScaleFactor: 3 });
await page.goto('https://public.flourish.studio/visualisation/19321054/', { waitUntil: 'networkidle2' });
console.log('
readline.emitKeypressEvents(process.stdin);
process.stdin.setRawMode(true);
process.stdin.on('keypress', async (str, key) => {
if (key.name === 'f4') {
console.log('
const outputFolder = 'E:/Desktop/ffgfgfgfgfg/New folder (3)/';
if (!fs.existsSync(outputFolder)) {
fs.mkdirSync(outputFolder, { recursive: true });
}
const timestamp = Date.now();
const screenshotPath = path.join(outputFolder, `screenshot_${timestamp}.png`);
// Capture a high-quality screenshot
await page.screenshot({
path: screenshotPath,
fullPage: true,
type: 'png',
omitBackground: true
});
console.log(`
}
});
})();
< /code>
Проблема: < /strong> < /p>
Анимация основной диаграммы выглядит размытой на экране. 3, что должно улучшить качество. < /Li>
< /ul>
Возможные причины и вопросы: < /strong> < /p>
Можно ли диаграмма расцвета внутри качества Iframe? /> Есть ли способ заставить более высокий рендеринг DPI или SVG внутри кукловода?>
Подробнее здесь: https://stackoverflow.com/questions/795 ... -sharp-for
Мобильная версия