W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2012

Re: [whatwg] [canvas] matrix based changes on bitmaps

From: Jussi Kalliokoski <jussi.kalliokoski@gmail.com>
Date: Fri, 21 Sep 2012 10:34:59 +0300
Message-ID: <CAJhzemVAbUBKt6ujJ3p=X6a=gMY_=MoDnahtorQQ_h1xuORy1w@mail.gmail.com>
To: Rob Manson <roBman@mob-labs.com>
Cc: Tyler Larson <talltyler@gmail.com>, Charles Pritchard <chuck@jumis.com>, Ian Hickson <ian@hixie.ch>, Boris Zbarsky <bzbarsky@mit.edu>, whatwg@whatwg.org
Please see the DSP API [1]. It's currently developed unofficially under the
W3C Audio WG [2], so if you have input, please post it to the audiowg
public mailing list. This should scratch your itch and more. ;)

Cheers,
Jussi

[1] http://people.opera.com/mage/dspapi/
[2] http://www.w3.org/2011/audio/

On Fri, Sep 21, 2012 at 2:06 AM, Rob Manson <roBman@mob-labs.com> wrote:

> +1
>
> Having matrix manipulation functions on ArrayBuffers that were
> implemented at a lower, more optimised level would be awesome and would
> open up all sorts of app opportunities.
>
> roBman
>
> On Thu, 20 Sep 2012 22:45:29 +0000 (UTC)
> Ian Hickson <ian@hixie.ch> wrote:
>
> > On Mon, 23 Apr 2012, Tyler Larson wrote:
> > >
> > > Looping over every pixel in JavaScript is slow. Many cool things
> > > could be taken care of much faster if the canvas had some form of
> > > matrix manipulations built in.
> > >
> > > All of the pixels could have one transformation operation defined
> > > and all of the pixels could be operated on at once in something
> > > lower level.
> > >
> > > It could look like this...
> > >
> > > context.transformMatrix([0.5,0.5,0.5,0,0,
> > >                                     0.5,0.5,0.5,0,0,
> > >                                     0.5,0.5,0.5,0,0,
> > >                                     0,0,0,1,0,
> > >                                     0,0,0,0,1]);
> > >
> > > It's far simpler than looping over an array of pixels and picking
> > > out the values of each color.
> > >
> > > Other graphics systems have ways of doing this already. You can
> > > easily find sample tutorials on how to create and transform
> > > matrixes.
> > >
> > > In some languages they have matrix objects that have methods for
> > > even easier manipulation of these transformations but I'm cool
> > > without this if it is easier.
> >
> > It seems like a reasonable suggestion, but since the pixel data is
> > available as an ArrayBuffer, it seems like the more reasonable thing
> > to do is to provide generic ArrayBuffer manipulation routines.
> >
> > I recommend raising this as feedback on the ArrayBuffer spec.
> >
>
>
Received on Friday, 21 September 2012 07:36:24 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:45 UTC