Reading jpg files from a folder….

Apr 1, 2009 at 9:48pm

Reading jpg files from a folder….

I need to read a bunch of jpegs into a patch. Other than using the jit.qt.window, does anyone know what object to use? I cant seem to find it in the Max tutorials or help options.
Any suggestions to how i can implement this? I just want to read jpeg files, that are initially triggered by an FFT. Every time a sound is triggered by the built-in mic a jpeg should change to the next jpeg.

Help is much appreciated!

#43147
Apr 2, 2009 at 1:28am

[jit.matrixset] is the common way, since it loads the matrix in ram, you can acess quickly.

#154703
Apr 2, 2009 at 1:03pm

Another option is to make your jpegs into a movie (for instance using Quicktime Pro). Then, you just load the movie into [jit.qt.movie].
Another option is to read each jpeg only when you need it, for instance using a umenu & autopopulate, and triggering the next jpeg by telling umenu the new number.
But Kyred’s option is surely the one to go first. You could use a umenu-based system to read the jpegs, dimension the jit.matrixset, and fill the set with the different images.
Send a patch of what you have (the jpeg reading system).
Jean-François Charles.

#154704
Apr 5, 2009 at 2:00pm

Thank you for all of your suggestions, i really appreciate it.
I have been toying around with it for quite some time now, and i simply can not come to a fruitful solution. I can easily read the jpegs using the jit.qt.movie into a jit.matrixset, but then i have to read every time i want to view a photo. I dont know what more i can do, or how i can make the umenu to work, as i have tried to connect it to several of the objects, but without any luck.
I simply want to loop through the photos in the umenu without having to read (use the read message) for each jpeg. Meaning opening every jpeg individually… also i am not quite sure of how the autopopulate variable works.

Check out the patch i have uploaded – Help is much appreciated!

#154705
Apr 5, 2009 at 4:03pm

you can try this :

– Pasted Max Patch, click to expand. –
#154706
Apr 5, 2009 at 4:14pm

Im not sure how to implement that – SORRY!
I tried copy/pasting it into a patch, but it does not allowed me. Any suggestions?

#154707
Apr 5, 2009 at 4:27pm

i don’t really uunderstad your problem.
just copy and do “new from clipboard” (cmd-alt-N).

#154708
Apr 5, 2009 at 4:31pm

That was weird, it worked fine when i did copy from clipboard. Anyways thank you very much, let me have a look at it.

#154709
Apr 6, 2009 at 9:56pm

Thank you very much for the help! I managed to redo the patch a little so it works as looping pictures and viewing them into a window. There is one problem though… my intention was to make a jpeg/photo viewer that is supposed work with an FFT / adc… meaning the input audio signal has to change a photo… at a certain peak, the next photo from the umenu has to be displayed.
I got really stuck in constructing this, as i have no idea to what i should connect the ezadc object.
Help is extremely appreciated!!
Check out the attached patch.

#154710
Apr 7, 2009 at 1:35pm

Study Jitter Tutorial 28. You could implement the “peak volume” detection it in your patch.
Then, if you want / need FFT, you should first make a separate patch dealing just with you FFT analysis / spectral peak detection.
Connecting this to your photo engine will be easy. You will need to study the MSP fft tutorials. I would use [pfft~], not only [fft~], might be easier to use, especially if you are beginning with FFT.
J-F.

#154711
Nov 26, 2013 at 10:52pm

I know this thread is old, but i would just like to say that FP’s patch provided the solution i was looking for. I’m still having one problem though. Large pictures (like photo size) get scrambled when i try to display them with jit.pwindow. I’ve created another post for this as it’s likely an entirely different issue: http://cycling74.com/forums/topic/images-with-variable-dimensions-scrambled-jit-pwindows/

#273889

You must be logged in to reply to this topic.