-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify expectactions for toDataURL()
and toBlob()
#125
Conversation
hdr_html_canvas_element.md
Outdated
@@ -162,6 +162,10 @@ not quantized, i.e. R' = 0.5 is represented by the floating point value 0.5. | |||
_NOTE: `dataType = "unorm8"` corresponds to HTML Canvas as it exists today and | |||
should not be used to represent HDR signal, as detailed in the introduction._ | |||
|
|||
The `HTMLCanvasElement` methods `toDataURL()` and `toBlob()` should produce | |||
resources that best match the fidelity of the underlying HTML Canvas element | |||
(subject to the limitations of the implementation and the requested format). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems a bit vague, hand-wavy and hard to test.
It seems better to crisply state that the color space of the 2D context should be preserved in toDataURL()
and toBlob()
. (And yes, if the requested format can't do that then there is an issue, but all common formats can represent that information).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't really respond to the TAG issue as it is too vague (and I don't see a reason for the vagueness). Currently, a Canvas 2D context is either sRGB or Display P3 and that info is easy to persist (for example using CICP).
How can it be made less vague without providing a specific mapping to each format, which the Web Platform does not do today? |
By explicitly stating that the color space of the Canvas context should be preserved, rather than vaguely mentioning "fidelity"
The mechanism by which each format does this need not be specified in detail. There are two common cross-format methods in use and my suggested text mentions both as examples. |
Co-authored-by: Chris Lilley <[email protected]>
Co-authored-by: Chris Lilley <[email protected]>
Closes #119