Good news! Robert O'Callahan informed me that the toDataUrl feature is
now working in the latest Firefox builds. Here's the IDL (interface
description language)
http://lxr.mozilla.org/seamonkey/source/dom/public/idl/html/nsIDOMHTMLCanvasElem\
ent.idl#58
I havent tried it out yet but it looks promising! There's even a new
toDataUrlAs which lets you get more granular as to what type of image
data you want! :
// This version lets you specify different image types and pass parameters
61 // to the encoder. For example toDataURLAs("image/png",
"transparency=none")
62 // gives you a PNG with the alpha channel discarded. See the
encoder for
63 // the options string that it supports. Separate multiple
options with
64 // semicolons.
--- In canvas-developers@yahoogroups.com, "grussmir" <gruss.mir@...>
wrote:
>
> --- In canvas-developers@yahoogroups.com, Marcus Engene <ehsmeng@>
> wrote:
> >
> > grussmir wrote:
> > > Hi folks,
> > > Canvas-Newbie Question:
> > > Is there any possibility to get the image data out of the canvas
into
> > > a variable to post it back to my php-server-skript?
> > > That would allow us to make some kind of dashboard.....
> > >
> > > MiR
> > Hi,
> >
> > As far as I know, no. Not widely implemented anyway. Apart from the
> > function Arve Bersvendsen just wrote about, a getPixel()-function
would
> > be nice. Then it would be easy to read the pixels in js and create
> an image.
> >
> > Anyway, as a workaround for this I did a simple js-class that has
some
> > drawing functions on it.
> (...)
> > Best regards,
> > Marcus
> >
>
> Thanks a lot, expected something like that.
> Alread found also the discussion on bugzille, wich mainly seems to
> adress security issues......
> So lets wait it out for later versions...
>
> Thanks
> MiR
>