#N canvas 141 109 695 520 10;
#X declare -lib Gem;
#X text 92 6 [pix_data];
#X text 93 25 get pixel-data of an image;
#X obj 14 57 cnv 15 430 170 empty empty empty 20 12 0 14 #e0e0e0 #404040 0;
#X obj 14 232 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0;
#X obj 14 266 cnv 15 430 210 empty empty empty 20 12 0 14 #e0e0e0 #404040 0;
#X obj 450 57 cnv 15 220 340 empty empty empty 20 12 0 14 #dce4fc #404040 0;
#X obj 454 165 cnv 15 210 150 empty empty empty 20 12 0 14 #14e814 #404040 0;
#X obj 462 293 pix_data;
#X msg 462 68 bang;
#X floatatom 515 319 5 0 0 1 gray-value - - 0;
#X floatatom 573 376 5 0 0 0 B - - 0;
#X floatatom 529 376 5 0 0 0 G - - 0;
#X floatatom 484 376 5 0 0 0 R - - 0;
#X text 495 336 color-list;
#X floatatom 492 170 5 0 0 1 x-pos - - 0;
#X floatatom 507 193 5 0 0 1 y-pos - - 0;
#X obj 477 94 gemhead;
#X text 453 15 GEM object;
#X obj 500 413 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0;
#X obj 568 8 declare -lib Gem;
#X text 21 271 Inlets:;
#X text 23 239 Arguments:;
#X text 89 239 [<xpos> <ypos>];
#X text 24 411 Outlets:;
#X text 42 424 Outlet 1: - (dead outlet for legacy reasons);
#X text 17 62 [pix_data] will get the colour of a specified pixel within an image when triggered., f 70;
#X text 34 286 Inlet 1: bang;
#X text 34 362 Inlet 2: gemlist;
#X text 34 299 Inlet 1: list <xpos> <ypos>, f 51;
#X text 34 336 Inlet 1: normalize 0|1: normalization mode (0=none \, 1=normalized. default=1), f 66;
#X text 34 318 Inlet 1: quality 0|1: interpolation mode (0=none \, 1=2D. default=0), f 66;
#X text 17 94 Use the "normalize"-message to switch off/on position normalization. If it is on (default) \, the coordinates within the image range from (0.0f \, 0.0f) (left-bottom) to (1.0f \, 1.0f) (right-top). If it is off \, the coordinates are in the range of 0..(width-1) and 0..(height-1)., f 70;
#X text 17 152 Use the "quality"-message to switch on/off pixel-interpolation., f 70;
#X text 17 169 After the first inlet is triggered with a "bang" \, the color of the specified pixels is output both as gray-value and as RGB-triplet. Send a list of two floats to the first inlet to set both positions and trigger the output with a single message., f 70;
#X obj 582 247 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1;
#X msg 582 270 normalize \$1;
#X obj 582 200 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1;
#X msg 582 223 quality \$1;
#X msg 523 223 1 1;
#X text 34 376 Inlet 3: float: xpos in the image;
#X text 34 389 Inlet 4: float: ypos in the image;
#X text 42 439 Outlet 2: list RGB value (normalized 0..1);
#X text 42 453 Outlet 3: float: grey value (normalized 0..1);
#X obj 484 353 unpack 0 0 0 0;
#X floatatom 626 376 5 0 0 0 A - - 0;
#X obj 506 420 _gemwin;
#X obj 477 138 pix_test;
#X connect 7 1 43 0;
#X connect 7 2 9 0;
#X connect 8 0 7 0;
#X connect 14 0 7 2;
#X connect 15 0 7 3;
#X connect 16 0 46 0;
#X connect 34 0 35 0;
#X connect 35 0 7 0;
#X connect 36 0 37 0;
#X connect 37 0 7 0;
#X connect 38 0 7 0;
#X connect 43 0 12 0;
#X connect 43 1 11 0;
#X connect 43 2 10 0;
#X connect 43 3 44 0;
#X connect 46 0 7 1;
