本文整理汇总了PHP中image::getInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP image::getInfo方法的具体用法?PHP image::getInfo怎么用?PHP image::getInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类image
的用法示例。
在下文中一共展示了image::getInfo方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: hotlinkimage
function hotlinkimage($cat_id, $type, $imgid, $key)
{
global $mosConfig_live_site, $my;
$gallery = new gallery($cat_id, false);
if (!$key) {
$key = $gallery->getImageKey($imgid);
} else {
$imgid = $gallery->_images[$key]->_id;
}
$image = new image($imgid);
$image->getInfo();
if ($this->_CONFIG['hotlinkProtection']) {
$params = "uid=" . $my->id . "&catid=" . $cat_id . "&key=" . $key . "&type=" . $type;
$params = $this->encrypt($params);
return $mosConfig_live_site . "/components/com_zoom/www/image.php?q=" . $params;
} else {
if ($type == '0') {
return $mosConfig_live_site . "/" . $this->_CONFIG['imagepath'] . $gallery->_dir . "/" . $image->_viewsize;
} elseif ($type == '1') {
return $mosConfig_live_site . "/" . $this->_CONFIG['imagepath'] . $gallery->_dir . "/" . $image->_filename;
} else {
return $image->_thumbnail;
}
}
}
示例2: comGenerateVideo
function comGenerateVideo()
{
require_once 'include/class/image.php';
$image = new image(false);
$image->video = 'flv';
$image->id = $this->data['id'];
$image->getCacheName();
$image->getInfo();
$image->generate();
$this->html = ' setVideoGenerated()';
$xml = '<?xml version="1.0" encoding="UTF-8" ?>
<RESPONSE>
<INFO>
<COMMAND>' . $this->command . '</COMMAND>
<ID>' . $this->data['id'] . '</ID>
<PID>' . $this->data['pid'] . '</PID>
</INFO>
</RESPONSE>';
$xml = preg_replace('/(\\s*)(.*)\\n/', "\\2\n", $xml);
$xml = preg_replace('/>(\\s*)\\n(\\s*)</', "><", $xml);
$this->html = $xml;
}
示例3: VALUES
$rating = "Explicit";
} else {
if ($rating == "q") {
$rating = "Questionable";
} else {
$rating = "Safe";
}
}
if ($userc->check_log()) {
$user = $checked_username;
} else {
$user = "Anonymous";
}
$ip = $db->real_escape_string($_SERVER['REMOTE_ADDR']);
$thumb = $image->thumbnail($iinfo[0] . "/" . $iinfo[1]);
$isinfo = $image->getInfo();
$query = "INSERT INTO {$post_table}(creation_date, hash, image, title, owner, height, width, ext, rating, tags, directory, source, active_date, ip) VALUES(NOW(), '" . md5_file("./images/" . $iinfo[0] . "/" . $iinfo[1]) . "', '" . $iinfo[1] . "', '{$title}', '{$user}', '" . $isinfo[1] . "', '" . $isinfo[0] . "', '{$ext}', '{$rating}', '{$tags}', '" . $iinfo[0] . "', '{$source}', '" . date("Ymd") . "', '{$ip}')";
if (!is_dir("./thumbnails/" . $iinfo[0] . "/")) {
$image->makethumbnailfolder($iinfo[0]);
}
if (!$thumb) {
print "Thumbnail generation failed! A serious error occurred and the image could not be resized.<br /><br />";
}
if (!$db->query($query)) {
print "failed to upload image.";
print $query;
unlink("./images/" . $iinfo[0] . "/" . $iinfo[1]);
$image->folder_index_decrement($iinfo[0]);
$ttags = explode(" ", $tags);
foreach ($ttags as $current) {
$tclass->deleteindextag($current);