]>
git.immae.eu Git - github/wallabag/wallabag.git/blob - inc/3rdparty/libraries/send2kindle/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 @imagefilter($imgFile, IMG_FILTER_GRAYSCALE
);
18 $image = ob_get_contents();
21 @imagedestroy($imgFile);