diff options
| author | ilotterytea <iltsu@alright.party> | 2025-06-10 23:39:30 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-06-10 23:39:30 +0500 |
| commit | 2536d0db7edf5069bc2aa22493a7594134eac72a (patch) | |
| tree | b434cc4df29ea92d93ee3f4383cea6708f9c76bc /public/generate.php | |
| parent | 4043b8cf79d870f025b23103914448e8507b1a04 (diff) | |
feat: generate message screenshot
Diffstat (limited to 'public/generate.php')
| -rw-r--r-- | public/generate.php | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/public/generate.php b/public/generate.php index 1238738..ba7883a 100644 --- a/public/generate.php +++ b/public/generate.php @@ -1,2 +1,24 @@ <?php -echo 'xd';
\ No newline at end of file +include_once '../src/message_picture.php'; + +$old_pfp = imagecreatefrompng('./pfp.png'); +$oldw = imagesx($old_pfp); +$oldh = imagesy($old_pfp); +$pfp = imagecreatetruecolor(72, 72); +imagecopyresampled($pfp, $old_pfp, 0, 0, 0, 0, 72, 72, $oldw, $oldh); + +$screenshot = generate_message_screenshot( + $pfp, + "ilotterytea", + "forsen", + "Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos sed quae minus libero odit illum atque itaque nulla! Ut quia fuga excepturi saepe nemo magni exercitationem aperiam commodi maxime ab.", + time() +); + +imagedestroy($pfp); +imagedestroy($old_pfp); + +header('Content-Type: image/jpeg'); +header("Content-Disposition: inline; filename*=UTF-8''someshit.jpg"); +imagejpeg($screenshot); +imagedestroy($screenshot);
\ No newline at end of file |
