On 6/19/15 5:43 AM, Ashley Gullen wrote:
I've not done this before, so I've no idea if this is the right/useful
approach, but I drafted a spec for it here:
https://www.scirra.com/labs/specs/imagedata-blob-extensions.html
Ashley,
We at Mozilla were just discussing this proposal, and we have a concern.
With this proposal, going from an <img> to an ImageData requires
conversion of an intermediate ImageBitmap. Unfortunately, an
ImageBitmap is specified to be paintable "without undue latency", which
we interpret to mean it needs to have decoded image data, and the
ImageData will end up needing to copy said data in practice (because it
needs an editable copy).
That creates two copies of the decoded image data in memory, which seems
fairly undesirable on memory-constrained devices.
-Boris