當前位置: 首頁>>代碼示例>>PHP>>正文


PHP cls_image::imageMix方法代碼示例

本文整理匯總了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", ''))) {
開發者ID:dapfru,項目名稱:gladiators,代碼行數:67,代碼來源:cls_form.php


注:本文中的cls_image::imageMix方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。