2 $comps = $_GET['comp'];
5 if (mb_strlen($comps, "ASCII") != 12)
8 for ($i = 0, $idx = 0 ; $i < 12 ; $i++) {
9 if (($comps[$i] >= '0' && $comps[$i] <= '9') ||
10 ($comps[$i] >= 'a' && $comps[$i] <= 'f')) {
12 $c[$idx] = hexdec(substr($comps, $i-1, 2));
20 header ('Content-type: image/png');
21 $img_r = @imagecreatefrompng("img/sup_msk_r.png");
22 $img_y = @imagecreatefrompng("img/sup_msk_y.png");
24 $ret = imagefilter($img_r, IMG_FILTER_COLORIZE, $c[0], $c[1], $c[2], 0);
25 $ret = imagefilter($img_y, IMG_FILTER_COLORIZE, $c[3], $c[4], $c[5], 0);
27 imagecopy($img_r, $img_y, 0,0, 0,0, 21, 16);
29 imagesavealpha($img_r, TRUE);