Forums > Jitter

can I set up a patch that automatically save a jpg image?


yo
September 17, 2007 | 3:10 am

hi, experts
I am setting up a patch to save a jpg image on my desktop from the "jit.qt.grab" function . I am successfully set up a patch to save the image manually on the desktop. Now I like to set up a patch that automatically save the file without clicking any keyboard. However, when the action trigger the function called "write 30. jpeg normal" it will pop out a window to confirm the saving location. so, my question is that is there a way I can use a different function to skip this "manual" step? or there is a code?!

thank you so much for your help!!!

aichen


September 17, 2007 | 3:20 am

#P inlet 163 70 15 0;
#P outlet 279 350 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 266 289 44 196617 _ write;
#P button 157 94 15 0;
#P newex 222 252 39 196617 lstring;
#P newex 203 176 53 196617 thresh 10;
#P newex 191 207 27 196617 join;
#P newex 209 150 30 196617 spell;
#P message 94 126 49 196617 xerxious;
#P newex 124 170 53 196617 thresh 10;
#P newex 125 150 30 196617 spell;
#N counter;
#X flags 0 0;
#P newobj 204 125 66 196617 counter;
#P window linecount 2;
#P message 152 325 80 196617 write xerxious31;
#P window linecount 1;
#P newex 195 290 14 196617 _;
#P connect 11 0 0 0;
#P fasten 11 0 12 0 269 342;
#P connect 9 0 11 0;
#P connect 7 0 9 0;
#P fasten 2 0 6 0 208 157;
#P connect 8 0 7 1;
#P connect 10 0 5 0;
#P connect 10 0 2 0;
#P connect 6 0 8 0;
#P connect 4 0 7 0;
#P connect 13 0 10 0;
#P connect 0 0 1 0;
#P connect 5 0 3 0;
#P connect 3 0 4 0;
#P window clipboard copycount 14;

On 9/16/07, aichen

wrote:
>
>
> hi, experts
> I am setting up a patch to save a jpg image on my desktop from the "
> jit.qt.grab" function . I am successfully set up a patch to save the image
> manually on the desktop. Now I like to set up a patch that automatically
> save the file without clicking any keyboard. However, when the action
> trigger the function called "write 30. jpeg normal" it will pop out a window
> to confirm the saving location. so, my question is that is there a way I can
> use a different function to skip this "manual" step? or there is a code?!
>
>
> thank you so much for your help!!!
>
> aichen
>
>
>
>



yo
September 17, 2007 | 3:52 am

um..what does these numbers mean?!




yo
September 17, 2007 | 6:45 pm

but it wouldn’t allow me to past, also I tried to put it on the Text Edit and save it with .pat file. it is not showing in the Max/MSP as well. am I doing anything wrong?!



yo
September 17, 2007 | 7:12 pm

hey, guys
thank you so much !!! I just update the latest version of Max/msp and it’s working !!!!!!

yeah!! big hugs

aichen



yo
September 18, 2007 | 3:19 am

hi Derek
could you give me a guide that how do I use this patch?!
I couldn’t understand most of the objects in this sub_patch.
is this the sub_patch for the write message? or it’s substution for the entire set up that I had.

thanks a lot!

aichen


September 18, 2007 | 3:57 am

try adding this to your patch.
change "image_name" in the sprintf to whatever you want to call the captures.

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 514 498 105 196617 jit.qt.record 720 480;
#P newex 514 475 101 196617 append 30. jpeg 600;
#P newex 514 453 73 196617 prepend write;
#P button 514 390 15 0;
#N counter;
#X flags 0 0;
#P newobj 514 410 66 196617 counter;
#P newex 514 431 140 196617 sprintf image_name_%ld.tiff;
#P connect 4 0 5 0;
#P connect 3 0 4 0;
#P connect 0 0 3 0;
#P connect 1 0 0 0;
#P connect 2 0 1 0;
#P window clipboard copycount 6;


September 18, 2007 | 3:58 am

rather…

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 514 498 105 196617 jit.qt.record 720 480;
#P newex 514 475 101 196617 append 30. tiff 600;
#P newex 514 453 73 196617 prepend write;
#P button 514 390 15 0;
#N counter;
#X flags 0 0;
#P newobj 514 410 66 196617 counter;
#P newex 514 431 140 196617 sprintf image_name_%ld.tiff;
#P connect 4 0 5 0;
#P connect 3 0 4 0;
#P connect 0 0 3 0;
#P connect 1 0 0 0;
#P connect 2 0 1 0;
#P window clipboard copycount 6;



yo
September 23, 2007 | 3:11 am

success !!!
thank you so much robtherich.
you save my life.

aichen


October 9, 2007 | 2:52 pm

Is it possible to do this so it writes over the same file each time? I’ve tried but it doesn’t do anything. Either that or get max to delete all files upon close?

Cheers

Andy


October 9, 2007 | 3:16 pm

Ah. No worries. jit.fprint does that nicely anyway.

Cheers anyway.


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