Forums > Jitter

embedding images into jitter?

December 7, 2013 | 2:33 pm

Hello,

I’m very new to max and I have been trying to solve this problem…

I’ve made a patch which is set up to crossfade between 2 images using jit.xfade. (The fade is controlled by audio input.) I figured out how to embed the sound I want into the patch so that I don’t have to open the sound file every time I use the patch (with the embed 1 message), but I can’t seem to figure out how to do the same with the images. I know that it is possible to send a {read videoname.mov} message to embed a video file but I am using a JPG image file, rather than a video. Any suggestions?

Sorry if I am not explaining this clearly –I’m still working on learning the language around programming too!

Thanks for any help!


December 7, 2013 | 6:56 pm

I don’t know about "embedding images" (other than using fpic and ticking embed in the inspector, but that won’t work here).

So I set up what I usually use for loading images into matrices. Basically, the "read" command will "read" in the last directory it read in (normally the same folder as the Max patch).

So just put your two images in the same folder as my max patch. Then, replace "read" and "read" messages with "read example1.jpg" and "read example2.jpg". Other image formats will work too, just use the proper file type.


December 7, 2013 | 6:58 pm

Note that I use a "loadbang" object to load the images every time the patch is opened. :) good luck with your project!


December 15, 2013 | 12:11 pm

Hi, Thanks so much for your help!


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