diff options
author | RaindropsSys <raindrops@equestria.dev> | 2024-01-13 16:12:11 +0100 |
---|---|---|
committer | RaindropsSys <raindrops@equestria.dev> | 2024-01-13 16:12:11 +0100 |
commit | 2b192b3840ac344c456b98304ea400f0af90da15 (patch) | |
tree | 081ba8cbc0add17f08c9b94fb4a830834d87c259 /pages/api/raindrops-img2-round.php | |
parent | 2bfdb0ab2e366007269d1b77446f1581801e05dc (diff) | |
download | pluralconnect-2b192b3840ac344c456b98304ea400f0af90da15.tar.gz pluralconnect-2b192b3840ac344c456b98304ea400f0af90da15.tar.bz2 pluralconnect-2b192b3840ac344c456b98304ea400f0af90da15.zip |
Updated 46 files and deleted 19 files (automated)
Diffstat (limited to 'pages/api/raindrops-img2-round.php')
-rw-r--r-- | pages/api/raindrops-img2-round.php | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/pages/api/raindrops-img2-round.php b/pages/api/raindrops-img2-round.php deleted file mode 100644 index 1b0d320..0000000 --- a/pages/api/raindrops-img2-round.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -$fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd/fronters.json"), true); - -$url = isset($fronters['members'][1]) ? ($fronters['members'][1]["avatar_url"] ?? "/assets/uploads/raindrops.png") : "/assets/uploads/raindrops.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 |