*/
namespace Friendica\Object;
+use Exception;
use Friendica\App;
use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Database\DBA;
use Friendica\Model\Photo;
use Friendica\Util\Network;
-use Exception;
use Imagick;
use ImagickPixel;
*/
class Image
{
+ /** @var Imagick|resource */
private $image;
/*
$stamp1 = microtime(true);
file_put_contents($path, $string);
- $a->saveTimestamp($stamp1, "file");
+ $a->getProfiler()->saveTimestamp($stamp1, "file", System::callstack());
}
/**
$a = \get_app();
$stamp1 = microtime(true);
file_put_contents($tempfile, $img_str);
- $a->saveTimestamp($stamp1, "file");
+ $a->getProfiler()->saveTimestamp($stamp1, "file", System::callstack());
$data = getimagesize($tempfile);
unlink($tempfile);
/// @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);
$stamp1 = microtime(true);
$imagedata = @file_get_contents($url);
- $a->saveTimestamp($stamp1, "file");
+ $a->getProfiler()->saveTimestamp($stamp1, "file", System::callstack());
}
$maximagesize = Config::get('system', 'maximagesize');
$stamp1 = microtime(true);
file_put_contents($tempfile, $imagedata);
- $a->saveTimestamp($stamp1, "file");
+ $a->getProfiler()->saveTimestamp($stamp1, "file", System::callstack());
$data = getimagesize($tempfile);