X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FObject%2FImage.php;h=9143c23c16b3d2d15f095a097832df604365d6d1;hb=d40b2792b638e68f3040f4a55d30d1b3ef3cbe44;hp=dfda0634cc1392eccd5fa04c50432957831073b4;hpb=af9067a381430b520a155bd3803a338d44cfaace;p=friendica.git diff --git a/src/Object/Image.php b/src/Object/Image.php index dfda0634cc..9143c23c16 100644 --- a/src/Object/Image.php +++ b/src/Object/Image.php @@ -12,7 +12,6 @@ use Friendica\Core\L10n; use Friendica\Core\Logger; use Friendica\Core\System; use Friendica\Database\DBA; -use Friendica\Model\Contact; use Friendica\Model\Photo; use Friendica\Util\Network; use Exception; @@ -24,6 +23,7 @@ use ImagickPixel; */ class Image { + /** @var Imagick|resource */ private $image; /* @@ -299,8 +299,6 @@ class Image $width = $this->getWidth(); $height = $this->getHeight(); - $dest_width = $dest_height = 0; - if ((! $width)|| (! $height)) { return false; } @@ -503,8 +501,6 @@ class Image $width = $this->getWidth(); $height = $this->getHeight(); - $dest_width = $dest_height = 0; - if ((!$width)|| (!$height)) { return false; } @@ -694,8 +690,6 @@ class Image return $string; } - $quality = false; - ob_start(); // Enable interlacing @@ -737,7 +731,6 @@ class Image Logger::log('Image: guessType: '.$filename . ($fromcurl?' from curl headers':''), Logger::DEBUG); $type = null; if ($fromcurl) { - $a = \get_app(); $headers=[]; $h = explode("\n", $header); foreach ($h as $l) { @@ -836,8 +829,6 @@ class Image */ public static function getScalingDimensions($width, $height, $max) { - $dest_width = $dest_height = 0; - if ((!$width) || (!$height)) { return false; } @@ -909,7 +900,7 @@ class Image /// @TODO /// $default_cid = $r[0]['id']; - /// $community_page = (($r[0]['page-flags'] == Contact::PAGE_COMMUNITY) ? true : false); + /// $community_page = (($r[0]['page-flags'] == User::PAGE_FLAGS_COMMUNITY) ? true : false); if ((strlen($imagedata) == 0) && ($url == "")) { Logger::log("No image data and no url provided", Logger::DEBUG); @@ -968,8 +959,6 @@ class Image $hash = Photo::newResource(); - $smallest = 0; - // Pictures are always public by now //$defperm = '<'.$default_cid.'>'; $defperm = "";