html2image icon indicating copy to clipboard operation
html2image copied to clipboard

High DPI Screenshot

Open shp7724 opened this issue 2 years ago • 1 comments

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}',
        ]

shp7724 avatar Jul 27 '21 13:07 shp7724

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. :)

shp7724 avatar Jul 27 '21 14:07 shp7724