New issue
Advanced search Search tips

Issue 914185 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature



Sign in to add a comment

Spec and provide way to set the DPI of returned images from HTMLCanvasElement.toBlob

Project Member Reported by kbr@chromium.org, Dec 12

Issue description

A colleague building a set of pluggable computational modules in the browser needs to be able to save HTMLCanvasElements to PNG files but specify the DPI at which those images should be rendered.

https://gitlab.cba.mit.edu/pub/libraries/blob/master/node/frepw.js implements this, at the cost of parsing and regenerating the entire PNG file.

The spec of Canvas.toBlob() should be improved to take an optional dictionary of arguments, arguably instead of the "quality" parameter. Quality could be one of the entries; the intended DPI could be another.

 

Sign in to add a comment