namespace Friendica\Object;
use Exception;
-use Friendica\Core\System;
use Friendica\DI;
use Friendica\Util\Images;
use Imagick;
$this->image->setFormat($format);
// Always coalesce, if it is not a multi-frame image it won't hurt anyway
- $this->image = $this->image->coalesceImages();
+ try {
+ $this->image = $this->image->coalesceImages();
+ } catch (Exception $e) {
+ return false;
+ }
/*
* setup the compression here, so we'll do it only once
break;
}
- // Logger::log('exif: ' . print_r($exif,true));
return $exif;
}
$stamp1 = microtime(true);
file_put_contents($path, $string);
- DI::profiler()->saveTimestamp($stamp1, "file", System::callstack());
+ DI::profiler()->saveTimestamp($stamp1, "file");
}
/**
return Images::getFormatsMap();
}
- /**
- * Guess image mimetype from filename or from Content-Type header
- *
- * @param string $filename Image filename
- * @param boolean $fromcurl Check Content-Type header from curl request
- * @param string $header passed headers to take into account
- *
- * @return string|null
- * @throws Exception
- * @deprecated in version 2019.12 please use Util\Images::guessType() instead.
- */
- public static function guessType($filename, $fromcurl = false, $header = '')
- {
- return Images::guessType($filename, $fromcurl, $header);
- }
-
/**
* @param string $url url
* @return array