summaryrefslogtreecommitdiff
path: root/pages/api/cloudburst-img-round.php
diff options
context:
space:
mode:
Diffstat (limited to 'pages/api/cloudburst-img-round.php')
-rw-r--r--pages/api/cloudburst-img-round.php18
1 files changed, 0 insertions, 18 deletions
diff --git a/pages/api/cloudburst-img-round.php b/pages/api/cloudburst-img-round.php
deleted file mode 100644
index 3238696..0000000
--- a/pages/api/cloudburst-img-round.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-$fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc/fronters.json"), true);
-
-$url = isset($fronters['members'][0]) ? ($fronters['members'][0]["avatar_url"] ?? "/assets/uploads/cloudburst.png") : "/assets/uploads/cloudburst.png";
-file_put_contents("/tmp/temp", file_get_contents($url));
-
-header("Content-Type: image/png");
-
-$id = bin2hex(random_bytes(8));
-exec('convert -size 128x128 xc:none -draw "roundrectangle 0,0,128,128,128,128" /tmp/' . $id . '-mask.png', $out);
-
-exec('convert -resize 128x128 "/tmp/temp" /tmp/' . $id . '-source.png');
-exec('convert /tmp/' . $id . '-source.png -matte /tmp/' . $id . '-mask.png -compose DstIn -composite /tmp/' . $id . '.png', $out2);
-
-unlink("/tmp/temp");
-
-echo(file_get_contents('/tmp/' . $id . '.png')); \ No newline at end of file