Closed Bug 1587846 Opened 5 years ago Closed 5 years ago

Add "format" and "quality" arguments to Page.captureScreenshot

Categories

(Remote Protocol :: CDP, enhancement, P1)

enhancement

Tracking

(firefox72 fixed)

RESOLVED FIXED
Firefox 72
Tracking Status
firefox72 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [puppeteer-alpha])

Attachments

(3 files)

To be able to set the format and quality of compression (jpeg only) we have to get both arguments implemented.

No longer blocks: 1549466
Blocks: 1549466

Running the puppeteer examples for screenshots I noticed that Puppeteer always sets the format argument. Currently we are raising an not yet implemented error. The implementation shouldn't be too hard, so I will have a look at it soon.

Priority: P3 → P2
Whiteboard: [puppeteer-alpha]
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Priority: P2 → P1

The actual screenshot data should be returned via the "data"
property of an object. Also the data URL prefix has to be
stripped off, so that only the base64 encoded data will be
transmitted.

Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e8155e813e54 [remote] Fix payload of return value for Page.captureScreenshot. r=remote-protocol-reviewers,ato https://hg.mozilla.org/integration/autoland/rev/cfee639c527a [remote] Add "format" option to Page.captureScreenshot. r=remote-protocol-reviewers,ato https://hg.mozilla.org/integration/autoland/rev/3ef1ca5d2649 [remote] Add "quality" option to Page.captureScreenshot. r=remote-protocol-reviewers,ato,maja_zf
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 72
Blocks: 1594871
Component: CDP: Page → CDP
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: