#N canvas 619 36 622 738 10; #X declare -lib Gem; #X msg 16 106 create \, 1; #X msg 23 127 0 \, destroy; #X obj 185 261 gemhead; #X obj 168 475 pix_texture; #X obj 185 111 gemhead; #X obj 100 187 loadbang; #X msg 100 208 0; #X obj 286 424 square 0.05; #X obj 286 349 translateXYZ; #X obj 101 304 separator; #X obj 185 137 t b; #X obj 286 305 separator; #X obj 20 508 pix_data; #X obj 36 420 pix_separator; #X obj 168 420 pix_separator; #X obj 20 482 t b f; #X obj 65 560 route 1 2 3 4; #X floatatom 65 648 5 0 0 0 - - -; #X floatatom 83 625 5 0 0 0 - - -; #X floatatom 102 606 5 0 0 0 - - -; #X floatatom 121 586 5 0 0 0 - - -; #X obj 168 454 translateXYZ 0 0 -0.01; #X obj 286 402 colorRGB; #X obj 16 150 gemwin 12; #X obj 35 441 pix_rgba; #X obj 111 651 > 0.5; #X obj 111 673 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X obj 65 534 list prepend; #X obj 168 521 rectangle 4 3; #X obj 168 498 mn-flip; #X obj 18 7 cnv 15 400 50 empty empty 11 14 24 0 24 -175655 -66577 0; #X text 70 16 Pure data + Gem; #X text 70 29 The double gemhead idiom; #X text 21 65 Let's see how to check the luminance for more than one spot; #X obj 185 203 t b l; #X obj 212 226 s list-info; #N canvas 343 294 449 122 colors 0; #X obj 7 11 r list-info; #X obj 7 32 unpack f f f f f f; #X obj 7 83 outlet red; #X obj 73 83 outlet green; #X obj 152 83 outlet blue; #X text 230 15 This subpatch takes the RGB color; #X text 231 29 values from the list.; #X connect 0 0 1 0; #X connect 1 3 2 0; #X connect 1 4 3 0; #X connect 1 5 4 0; #X restore 297 373 pd colors; #N canvas 524 67 450 300 position 0; #X obj 11 13 r list-info; #X obj 11 34 unpack f f f f f f; #X obj 30 80 mn-coor_map; #X obj 144 35 mn-flip; #X obj 144 13 gemhead; #X obj 144 57 gemlist_info; #X obj 161 79 unpack f f f; #X obj 161 124 == 0; #X obj 93 230 * -1; #X obj 30 227 * -1; #X obj 161 102 change; #X obj 161 146 sel 0 1; #X obj 93 255 outlet y; #X msg 161 181 1; #X msg 191 181 -1; #X obj 30 253 outlet x; #X text 255 13 this subpatch makes sure; #X text 256 29 the dots are placed at the; #X text 257 45 right spot.; #X text 257 60 It takes into account if; #X text 259 76 you flipped the image; #X text 259 93 around with mn-flip.; #X connect 0 0 1 0; #X connect 1 1 2 0; #X connect 1 2 2 1; #X connect 2 0 9 0; #X connect 2 1 8 0; #X connect 3 0 5 0; #X connect 4 0 3 0; #X connect 5 1 6 0; #X connect 6 0 10 0; #X connect 7 0 11 0; #X connect 8 0 12 0; #X connect 9 0 15 0; #X connect 10 0 7 0; #X connect 11 0 13 0; #X connect 11 1 14 0; #X connect 13 0 9 1; #X connect 14 0 9 1; #X restore 309 326 pd position; #N canvas 318 523 450 300 index-position 0; #X obj 14 13 r list-info; #X obj 14 34 unpack f f f f f f; #X text 166 10 this subpatch takes the index and the; #X text 166 28 coordinates from the list; #X obj 14 124 outlet index; #X obj 96 124 outlet x; #X obj 153 124 outlet y; #X connect 0 0 1 0; #X connect 1 0 4 0; #X connect 1 1 5 0; #X connect 1 2 6 0; #X restore 20 461 pd index-position; #X text 419 200 list items contain:; #X text 420 216 1 the index number; #X text 421 232 2 X coordinate; #X text 420 248 3 Y coordinate; #X text 422 263 4 Red color value; #X text 421 279 5 Green color value; #X text 422 294 6 Blue color value; #X msg 185 166 1 0.5 0.5 1 0 0 \, 2 0.1 0.1 0 1 1 \, 3 0.9 0.9 0 0 1 \, 4 0.8 0.7 1 1 0; #X obj 101 347 pix_video; #X obj 313 15 declare -lib Gem; #X text 19 705 Max Neupert \, GMU - Bauhaus University Weimar 2008 - 2012; #X text 30 625 cyan; #X text 36 646 red; #X text 21 585 yellow; #X text 27 607 blue; #X connect 0 0 23 0; #X connect 1 0 23 0; #X connect 2 0 9 0; #X connect 2 0 11 0; #X connect 3 0 29 0; #X connect 4 0 10 0; #X connect 5 0 6 0; #X connect 6 0 2 0; #X connect 8 0 22 0; #X connect 9 0 47 0; #X connect 10 0 46 0; #X connect 11 0 8 0; #X connect 12 2 27 0; #X connect 13 0 24 0; #X connect 14 0 21 0; #X connect 15 0 12 0; #X connect 15 1 27 1; #X connect 16 0 17 0; #X connect 16 1 18 0; #X connect 16 2 19 0; #X connect 16 3 20 0; #X connect 18 0 25 0; #X connect 21 0 3 0; #X connect 22 0 7 0; #X connect 24 0 12 1; #X connect 25 0 26 0; #X connect 27 0 16 0; #X connect 29 0 28 0; #X connect 34 0 2 0; #X connect 34 1 35 0; #X connect 36 0 22 1; #X connect 36 1 22 2; #X connect 36 2 22 3; #X connect 37 0 8 1; #X connect 37 1 8 2; #X connect 38 0 15 0; #X connect 38 1 12 2; #X connect 38 2 12 3; #X connect 46 0 34 0; #X connect 47 0 14 0; #X connect 47 0 13 0;