embedding images into jitter?

snowfoot's icon

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!

vcbcvfh67's icon

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.

xfade_images.maxpat
Max Patch
vcbcvfh67's icon

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

snowfoot's icon

Hi, Thanks so much for your help!