本文整理汇总了PHP中image::getImageHeight方法的典型用法代码示例。如果您正苦于以下问题:PHP image::getImageHeight方法的具体用法?PHP image::getImageHeight怎么用?PHP image::getImageHeight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类image
的用法示例。
在下文中一共展示了image::getImageHeight方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: uploadFile
function uploadFile($filepath)
{
// getting paths
$uploadedfile = $filepath;
$uploaddir = $this->uploadDir;
// creating Directory of logged in userid
$dir = $_SESSION['foongigs_userid'];
if ($dir) {
if (!file_exists($uploaddir . $dir . "/")) {
mkdir($uploaddir . $dir . "/", 0777);
}
}
// creating files
$image = new image($imagepath);
$this->randfilename = $image->getFileName();
$this->fileext = $image->getFileExtension();
$this->width = $image->getImageHeight();
$this->height = $image->getImageWidth();
for ($i = 0; $i < count($size); $i++) {
$dimension = explode("x", $size[$i]);
$destination = $uploaddir . $dir . "/" . $this->randfilename . "_" . $size[$i] . "." . $this->fileext;
$image->createAndResize($destination, $dimension[0], $dimension[1], $this->imageQuality);
}
// Upload Original File....
$destination = $uploaddir . $dir . "/" . $this->randfilename . "_original" . "." . $this->fileext;
$image->moveTo($destination);
}
示例2: getHeight
/**
* 获得图像高度
*
* @return int 图像高度
*/
function getHeight()
{
return $this->image->getImageHeight();
}