]>
git.immae.eu Git - github/wallabag/wallabag.git/blob - inc/3rdparty/libraries/MOBIClass/ImageHandler.php
6 * @param string $url Url to the image
7 * @return false|string False if failed, else the data of the image (converted to grayscale jpeg)
9 public static function DownloadImage($url){
10 $data = Http
::Request($url);
11 $imgFile = @imagecreatefromstring($data);
13 if($imgFile !== false){
14 $result = self
::CreateImage($imgFile);
15 imagedestroy($imgFile);
22 * @param resource $img Create an image created with createimagetruecolor
23 * @return false|string False if failed, else the data of the image (converted to grayscale jpeg)
25 public static function CreateImage($img){
27 imagefilter($img, IMG_FILTER_GRAYSCALE
);
31 $image = ob_get_contents();