X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FObject%2FImage.php;h=608f64e97c057741445b142d799f3f20ba98237e;hb=0a4dc51bdc401f36a6eea73dc47846964d49bc00;hp=dd9590369611712df969d751b3dad0f5a5b55bf7;hpb=6f290607de7f10cea7429aacd0b394fd3f4c4e69;p=friendica.git diff --git a/src/Object/Image.php b/src/Object/Image.php index dd95903696..608f64e97c 100644 --- a/src/Object/Image.php +++ b/src/Object/Image.php @@ -134,9 +134,6 @@ class Image switch ($this->getType()) { case "image/png": $quality = DI::config()->get('system', 'png_quality'); - if ((! $quality) || ($quality > 9)) { - $quality = PNG_QUALITY; - } /* * From http://www.imagemagick.org/script/command-line-options.php#quality: * @@ -150,9 +147,6 @@ class Image break; case "image/jpeg": $quality = DI::config()->get('system', 'jpeg_quality'); - if ((! $quality) || ($quality > 100)) { - $quality = JPEG_QUALITY; - } $this->image->setCompressionQuality($quality); } @@ -680,16 +674,10 @@ class Image switch ($this->getType()) { case "image/png": $quality = DI::config()->get('system', 'png_quality'); - if ((!$quality) || ($quality > 9)) { - $quality = PNG_QUALITY; - } imagepng($this->image, null, $quality); break; case "image/jpeg": $quality = DI::config()->get('system', 'jpeg_quality'); - if ((!$quality) || ($quality > 100)) { - $quality = JPEG_QUALITY; - } imagejpeg($this->image, null, $quality); } $string = ob_get_contents(); @@ -697,49 +685,4 @@ class Image return $string; } - - /** - * supported mimetypes and corresponding file extensions - * - * @return array - * @deprecated in version 2019.12 please use Util\Images::supportedTypes() instead. - */ - public static function supportedTypes() - { - return Images::supportedTypes(); - } - - /** - * Maps Mime types to Imagick formats - * - * @return array With with image formats (mime type as key) - * @deprecated in version 2019.12 please use Util\Images::getFormatsMap() instead. - */ - public static function getFormatsMap() - { - return Images::getFormatsMap(); - } - - /** - * @param string $url url - * @return array - * @throws \Friendica\Network\HTTPException\InternalServerErrorException - * @deprecated in version 2019.12 please use Util\Images::getInfoFromURLCached() instead. - */ - public static function getInfoFromURL($url) - { - return Images::getInfoFromURLCached($url); - } - - /** - * @param integer $width width - * @param integer $height height - * @param integer $max max - * @return array - * @deprecated in version 2019.12 please use Util\Images::getScalingDimensions() instead. - */ - public static function getScalingDimensions($width, $height, $max) - { - return Images::getScalingDimensions($width, $height, $max); - } }