#N canvas 536 123 739 620 10;
#X declare -lib Gem;
#X obj 17 419 cnv 15 430 190 empty empty empty 20 12 0 14 #e0e0e0 #404040 0;
#X text 28 422 Inlets:;
#X text 28 579 Outlets:;
#X obj 17 384 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0;
#X text 26 383 Arguments:;
#X obj 17 69 cnv 15 430 310 empty empty empty 20 12 0 14 #e0e0e0 #404040 0;
#X text 46 592 Outlet 1: gemlist;
#X text 52 436 Inlet 1: gemlist;
#X text 27 72 Description: Make a snapshot of the frame-buffer and write it to a file;
#X text 52 522 Inlet 2: list: offsetX offsetY (in pixels \; default: 0 0);
#X text 52 548 Inlet 3: list: dimenX dimenY (in pixels \; default: window-size);
#X text 536 6 GEM object;
#X obj 459 77 cnv 15 250 370 empty empty empty 20 12 0 14 #dce4fc #404040 0;
#X text 463 60 Example:;
#X obj 604 383 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0;
#X obj 460 106 cnv 15 240 230 empty empty empty 20 12 0 14 #14e814 #404040 0;
#X msg 584 289 256 256;
#X text 638 289 dimension;
#X text 637 267 offset;
#X msg 584 265 100 100;
#X obj 461 84 gemhead 51;
#X msg 470 116 file pix_test 99;
#X text 580 138 type : jpg;
#X text 580 127 name : pix_testXXXXX.jpg;
#X text 580 151 quality : 99;
#X text 580 115 set pix_write to:;
#X msg 490 215 auto \$1;
#X obj 490 196 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1;
#X obj 491 245 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000;
#X text 510 244 WRITE! one file;
#X obj 464 399 gemhead;
#X obj 464 424 square;
#X text 463 379 display something;
#X obj 466 560 pix_snap;
#X text 464 539 See also:;
#X obj 466 584 pix_writer;
#X text 26 260 BE CAREFUL with the filename \, depending on your OS \, relative names may be different. It start from the patch in Linux or from HD (/) in osx for example. DO NOT USE SPACES in the basefilename;
#X text 81 41 Class: pix object;
#X text 27 207 With the "file" message you can specify a base-filename and the type of image-files you want to create. The actual name of the file will be something like: "<basefilename><current#>.<ext>" (like "GEM00001.tif");
#X text 60 22 Synopsis: [pix_write];
#X text 26 319 Supported file-types are TIFF (quality=0) and JPEG (quality>0). TIFF-writing can be slow due to the large file size of uncompressed images! JPEG might be faster (but quality will be lower due to compression);
#X text 543 209 activate/deactivate auto snapshot, f 24;
#X text 52 473 Inlet 1: file <quality> : set type/quality (quality=0:TIFF \, quality>0:JPG);
#X text 52 498 Inlet 1: file <basefilename> <quality> : set basefilename and type/quality;
#X text 52 449 Inlet 1: file <basefilename> : set basefilename \, and type=TIFF;
#X obj 461 312 pix_write 0 0 500 500 3;
#X text 71 394 list: [offsetX offsetY [dimX dimY [color_format]]];
#X text 26 99 When banged [pix_write] will take a snapshot of the current frame buffer and saves it to a file. When a "bang" message is sent to [pix_write] \, that is the moment that something is captured from the current frame buffer. When grabbing \, be sure that something is in the rendering-buffer \, else you will get a black texture. color_mode let you grab 1 (only red channel) \, 3 (RGB) or 4 (RGBA) byte per pixel. RGBA mode is useful with framebuffer.;
#X msg 480 162 color_format 4;
#N canvas 484 243 450 300 META 0;
#X obj 10 25 declare -lib Gem;
#X text 10 45 DESCRIPTION Make a snapshot of the frame-buffer and write it to a file;
#X text 10 65 KEYWORDS Gem pix image;
#X text 20 85 INLET_0 gemlist file;
#X text 20 105 INLET_1 list;
#X text 20 125 INLET_2 list;
#X text 20 145 OUTLET_0 gemlist;
#X text 10 165 AUTHOR IOhannes m zmölnig;
#X text 10 185 LICENSE GPL v2;
#X restore 608 8 pd META;
#X obj 609 389 _gemwin;
#X connect 16 0 45 2;
#X connect 19 0 45 1;
#X connect 20 0 45 0;
#X connect 21 0 45 0;
#X connect 26 0 45 0;
#X connect 27 0 26 0;
#X connect 28 0 45 0;
#X connect 30 0 31 0;
#X connect 48 0 45 0;
