html2image
html2image copied to clipboard
High DPI Screenshot
Please add an option to screenshot at high dpi.
I found that adding --force-device-scale-factor=3
argument creates 3x high-res images.
command = [
f'{self.executable}',
'--headless',
f'--screenshot={os.path.join(output_path, output_file)}',
f'--force-device-scale-factor=3',
f'--window-size={size[0]},{size[1]}',
*self.flags,
f'{input}',
]
I just noticed that I can manually pass --force-device-scale-factor=3
flag to create high-res image.
Still, it would be great if it was implemented as a function params, etc. :)