Forums > Java

JitterMatrix copying

June 13, 2009 | 9:57 am

I have noticed that there are functions like copyVectorToArray to copy line by line the contents of the JitterMatrix to an array. There are times you need to get all the contents of JitterMatrix to array and process them and put them back.

Is there a function copy contents of JitterMatrix to an array at once?


June 13, 2009 | 4:29 pm

>>Is there a function copy contents of JitterMatrix to an array at once?

yes, the method CopyMatrixToArray as i sayed to you in the other topic.


June 13, 2009 | 7:46 pm

In my JitterMatrix I hold an image. When you copy the array using CopyMatrixToArray what is the format it goes to the array
Alpha, r, g , b , …
or
each plane separately like alpha plane first, then red plane etc


June 14, 2009 | 8:57 am

it’s Alpha, r, g , b , …


June 16, 2009 | 5:27 pm

I used following code to modify the array content. What I expected was a dimmed image but the output was totally different. Am I processing the array properly?

int[] rippleAllPlanes         = new int[width*height*planecount];

back_draw.copyMatrixToArray(rippleAllPlanes);

for (int y=0;y


June 17, 2009 | 10:45 am

i think you’re wrong on this line:

for (int k=1;k

i should be:

for (int k=0;k

(ex: if it’s 4 planes, it’s 0 to 3 … )


June 17, 2009 | 10:55 am

I didn’t want to change the alpha value that is why I started from 1. It is the first element in right?

Do you see anything else wrong?


June 17, 2009 | 11:16 am

It is the first element in right? yes

Do you see anything else wrong? no,sorry..


June 17, 2009 | 11:19 am

Do you have a sample program processing an array like this?


June 17, 2009 | 11:28 am

only my exemple patch at the begining of the other topic :
http://www.cycling74.com/forums/index.php?t=msg&th=35075&start=0&rid=2682&S=37ff6d4e68f7159cad13534b3d988d11


September 14, 2012 | 3:27 pm

Wijesijp’s code is working fine here.


Viewing 11 posts - 1 through 11 (of 11 total)