本文整理汇总了PHP中cls_image::imageMix方法的典型用法代码示例。如果您正苦于以下问题:PHP cls_image::imageMix方法的具体用法?PHP cls_image::imageMix怎么用?PHP cls_image::imageMix使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cls_image
的用法示例。
在下文中一共展示了cls_image::imageMix方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
//.........这里部分代码省略.........
//print "$type<br>";
//exit;
if (($type == "flag" || $type == "image" || $type == "imageeditor") && ($f[name] || $_POST['UploadedImage']) && ($id || strstr($str, "insert "))) {
//print $str;
//exit;
$image = new cls_image($f);
if ($this->mode == 1) {
$image->maxsize = $field->getAttribute("maxsize", '');
$image->maxwidth = $field->getAttribute("maxwidth", '');
$image->maxheight = $field->getAttribute("maxheight", '');
$image->mix = $field->getAttribute("mix", '');
$image->mix2 = $field->getAttribute("mix2", '');
if ($position = $field->getAttribute("position", '')) {
$image->position = $position;
}
if ($width = $field->getAttribute("width", '')) {
$image->newWidth = $width;
$image->fix = "width";
}
if ($height = $field->getAttribute("height", '')) {
$image->newHeight = $height;
$image->fix = "height";
}
if ($fix = $field->getAttribute("fix", '')) {
$image->fix = $fix;
}
} else {
$image->maxsize = $field['maxsize'];
$image->maxwidth = $field['maxwidth'];
$image->maxheight = $field['maxheight'];
$image->mix = $field['mix'];
$image->mix2 = $field['mix2'];
if ($image->mix2) {
$image2 = new cls_image($image->imageMix($image->mix2));
$image->contents = $image2->contents;
}
if ($position = $field['position']) {
$image->position = $position;
}
if ($width = $field['width']) {
$image->newWidth = $width;
$image->fix = "width";
}
if ($height = $field['height']) {
$image->newHeight = $height;
$image->fix = "height";
}
if ($fix = $field['fix']) {
$image->fix = $fix;
}
}
if ($_POST['UploadedImage'] == 1) {
$file_name = $site_path . "/images/" . $this->table . "/" . strtolower($name) . "/0.jpg";
$file = fopen($file_name, "r");
$image->contents = fread($file, filesize($file_name));
fclose($file);
$image->type = "jpeg";
} else {
$image->check();
}
${$name} = $image->contents;
$im_array[$im_count]['name'] = $item->name;
$im_array[$im_count]['image'] = $image->contents;
if (($width || $height) && $image->type == "gif") {
if ($this->mode == 1) {
if (!($bgcolor = $field->getAttribute("bgcolor", ''))) {