projects
/
brisk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dev commit
[brisk.git]
/
web
/
suprend.php
diff --git
a/web/suprend.php
b/web/suprend.php
index
910ff8e
..
e620811
100644
(file)
--- a/
web/suprend.php
+++ b/
web/suprend.php
@@
-1,5
+1,17
@@
<?php
<?php
+if (isset($_GET['comp']) == FALSE)
+ exit;
+
+if (isset($_GET['sfx']) && $_GET['sfx'] == '_side') {
+ $is_side = TRUE;
+}
+else {
+ $is_side = FALSE;
+}
+
+
$comps = $_GET['comp'];
$comps = $_GET['comp'];
+
$c = array();
if (mb_strlen($comps, "ASCII") != 12)
$c = array();
if (mb_strlen($comps, "ASCII") != 12)
@@
-18,13
+30,22
@@
for ($i = 0, $idx = 0 ; $i < 12 ; $i++) {
}
header ('Content-type: image/png');
}
header ('Content-type: image/png');
-$img_r = @imagecreatefrompng("img/sup_msk_r.png");
-$img_y = @imagecreatefrompng("img/sup_msk_y.png");
+if ($is_side == TRUE) {
+ $img_r = @imagecreatefrompng("img/sup_msk_side_r.png");
+ $img_y = @imagecreatefrompng("img/sup_msk_side_y.png");
+}
+else {
+ $img_r = @imagecreatefrompng("img/sup_msk_r.png");
+ $img_y = @imagecreatefrompng("img/sup_msk_y.png");
+}
$ret = imagefilter($img_r, IMG_FILTER_COLORIZE, $c[0], $c[1], $c[2], 0);
$ret = imagefilter($img_y, IMG_FILTER_COLORIZE, $c[3], $c[4], $c[5], 0);
$ret = imagefilter($img_r, IMG_FILTER_COLORIZE, $c[0], $c[1], $c[2], 0);
$ret = imagefilter($img_y, IMG_FILTER_COLORIZE, $c[3], $c[4], $c[5], 0);
-imagecopy($img_r, $img_y, 0,0, 0,0, 21, 16);
+if ($is_side == TRUE)
+ imagecopy($img_r, $img_y, 0,0, 0,0, 6, 16);
+else
+ imagecopy($img_r, $img_y, 0,0, 0,0, 21, 16);
imagesavealpha($img_r, TRUE);
imagesavealpha($img_r, TRUE);