Forums > Jitter

matrix/image manipulation ? from newbie

October 13, 2006 | 9:15 pm

well, this is my last resort. this can’t be that difficult, but i haven’t been able to figure it out yet.
i have a 600×600 matrix that puts an image out to a jit.window.
it loads images (using importmovie) and displays them. i’m trying to figure out how to load another image, smaller in size, and place it "over" the original image in some specified location. i assume i have to somehow replace the data in part of the original matrix with the new data.
tutorial 14 shows me how to move around the data from one matrix, but another matrix being loaded replaces the original one. i want to keep the original one, just change part of it. i can’t figure out how to combine two images in one matrix or replace part of one image with part of another.
thanks in advance for your help.


October 13, 2006 | 9:27 pm

jit.videoplane. Check the docs, check the Jitter tutorial
(P. 466 or so).


October 13, 2006 | 10:15 pm

thanks.
yeah, i’ve been looking at using that. mabye my brain’s just tired from trying to figure this out for 4 hours, but it’s not coming together for me. i’ve attached here the patch i’m using to try to figure this out. most of it is cobbled together from tutorial 14 stuff. i’ve got comments explaining what i’m trying to do. maybe somebody could make change things in the patch and let me know what i need to do. i know these beginning questions might seem stupid to the masters here, but i’d really appreciate any help.
thanks.

(also, how do i make my patch appear here at text? i know i can take the text from a forum post and save it in a text exitor and change the extension to open it in max. but when i do the reverse (change the extension of a patch to .txt and open it in a text editor) it’s a bunch of jibberish.)


October 14, 2006 | 2:27 am

Perhaps you might have more success by
starting from the jit.gl.videoplane help file.
You’ll notice in the upper left that there’s
a sequence of erase and draw commands
being sent in an order. You should ask
yourself what would happen if you had
another movie that was sending to the
same rendering destination, and add the
ordered bangs accordingly.


October 14, 2006 | 8:44 am

You could use dstdim to decide what region of the matrix you are writing
to. Check out the @usedstdim, @dstdimstart and @dstdimend for jit.matrix
and the similar @usedstrect and @destrect for jit.window.

Best,
Trond

collin wrote:
> well, this is my last resort. this can’t be that difficult, but i haven’t been able to figure it out yet.
> i have a 600×600 matrix that puts an image out to a jit.window.
> it loads images (using importmovie) and displays them. i’m trying to figure out how to load another image, smaller in size, and place it "over" the original image in some specified location. i assume i have to somehow replace the data in part of the original matrix with the new data.
> tutorial 14 shows me how to move around the data from one matrix, but another matrix being loaded replaces the original one. i want to keep the original one, just change part of it. i can’t figure out how to combine two images in one matrix or replace part of one image with part of another.
> thanks in advance for your help.


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