schickling/chromeless

Ability to change image type and quality on screenshot

Aberta

#256 aberto em 21 de ago. de 2017

 (0 comentário) (8 reações) (0 responsável)TypeScript (606 forks)batch import
APIfeaturehelp wanted

Métricas do repositório

Stars
 (13.240 estrelas)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

I wanted to use jpeg to capture screenshots with lower quality so I can render the screenshots much faster (which has typically been the case when using other tools like phantomJS).

The current API doesn't have support for these customization when generating a screenshot. Capture screenshot method supports image format and quality (as well as some other options): https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-captureScreenshot

It would be great if the chromeless API had support for this. Seems like PDF options are already supported and is just a passthrough to the CDT: https://github.com/graphcool/chromeless/blob/master/src/api.ts#L234

Would be great to expose something similar for captureScreenshot

Thanks!

Guia do colaborador