mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Renaming and fixing some filestructure
This commit is contained in:
18
public/php/imageblob.php
Executable file
18
public/php/imageblob.php
Executable file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
$url = file_get_contents("https://img.youtube.com/vi/".$_POST['id']."/mqdefault.jpg");
|
||||
|
||||
$image = new Imagick();
|
||||
$image->readImageBlob($url);
|
||||
|
||||
|
||||
$image->blurImage(30,50);
|
||||
|
||||
$output = $image->getimageblob();
|
||||
|
||||
$image->setImageFormat("jpeg");
|
||||
|
||||
file_put_contents ("../public/images/thumbnails/".$_POST['id'].".jpg", $image);
|
||||
|
||||
echo base64_encode($output);
|
||||
?>
|
||||
Reference in New Issue
Block a user