According to the WhatWG spec for , getImageData() returns a
CavasPixelArray, which is an array of bytes. What if you created a
JavaScriptObject to represent it? Does GWT thunk to bytes across the
JSNI boundary OK? I know it won't pass arrays of anything back, but
individual elements maybe:
import
On 4 mar, 06:10, Kevin Tarn wrote:
> Unfortunately, using JsArrayInteger is very slow:
> public byte[] getBitmap() {
> // String str = getImageData(0, 0, width, height);
> // byte[] ar = new byte[str.length()];
> // for (int i=0; i // ar[i] = (byte)((int)str.
Unfortunately, using JsArrayInteger is very slow:
public byte[] getBitmap() {
//String str = getImageData(0, 0, width, height);
//byte[] ar = new byte[str.length()];
//for (int i=0; i wrote:
>
>
> On 3 mar, 23:47, Kevin Tarn wrote:
> > Yes. That's what I like to do. Co
On 3 mar, 23:47, Kevin Tarn wrote:
> Yes. That's what I like to do. Could you give an example of retreiving
> canvas raw data by GWT instead of JSNI?
Get our JSNI methods the shorter you can. Here, just make it get
oData.data and return it as a JsArrayNumber; then do all the following
in Java,
Yes. That's what I like to do. Could you give an example of retreiving
canvas raw data by GWT instead of JSNI?
Kevin
On Wed, Mar 4, 2009 at 4:18 AM, Matt Bishop wrote:
>
> This is pretty cool. You should try converting the data in GWT instead
> of JSNI. It could go straight to bytes, or at leas
This is pretty cool. You should try converting the data in GWT instead
of JSNI. It could go straight to bytes, or at least it could take
advantage of GWT's StringBuilder speed.
On Mar 1, 4:57 pm, Kevin Tarn wrote:
> Forgot to tell: getImageData method convert raw data to a Windows DIB
> format.
Forgot to tell: getImageData method convert raw data to a Windows DIB
format.
Kevin
On Mon, Mar 2, 2009 at 8:52 AM, Kevin Tarn wrote:
> I got idea from canvas2image.js(http://www.nihilogic.dk/labs/canvas2image/).
> So I wrote a JSNI methods as below:
>
> public native String getImageData(in
I got idea from canvas2image.js(http://www.nihilogic.dk/labs/canvas2image/).
So I wrote a JSNI methods as below:
public native String getImageData(int left, int top, int width, int
height) /*-{
var oData =
th...@com.messenger.client.framework.canvas::context.getImageData(left,
top, wi
Could you say how you solved this problem? For historic purpose...
Thanks in advance!
> I have solved problem.
>
> Kevin
--
--fx
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post
I have solved problem.
Kevin
On Thu, Feb 26, 2009 at 12:45 AM, Kevin Tarn wrote:
>
> I have a canvas widget. I want to use JSNI to get canvas bitmap by
> getImageData method. Is there a way to return getImageData output to
> Java byte[]?
>
> Kevin
> >
>
--~--~-~--~~~---
I have a canvas widget. I want to use JSNI to get canvas bitmap by
getImageData method. Is there a way to return getImageData output to
Java byte[]?
Kevin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Google Web T
11 matches
Mail list logo