本文整理汇总了PHP中cls_image::gif2jpeg方法的典型用法代码示例。如果您正苦于以下问题:PHP cls_image::gif2jpeg方法的具体用法?PHP cls_image::gif2jpeg怎么用?PHP cls_image::gif2jpeg使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cls_image
的用法示例。
在下文中一共展示了cls_image::gif2jpeg方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
//.........这里部分代码省略.........
$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", ''))) {
$bgcolor = "ffffff";
}
} else {
if (!($bgcolor = $field['bgcolor'])) {
$bgcolor = "ffffff";
}
}
if ($width && $image->width > $width || $height && $image->height > $height) {
$image->gif2jpeg($bgcolor);
}
}
$Type = $image->type;
$ph[$name] = 1;
$ph['Small'] = 1;
if ($image->type != "gif") {
$Small = new cls_image($image->imageResize());
$Small = $Small->contents;
} else {
$Small = ${$name};
}
if ($_POST['UploadedImage'] == 1) {
$file_name = $site_path . "/images/" . $this->table . "/" . "small" . "/0.jpg";
$file = fopen($file_name, "r");
$Small = fread($file, filesize($file_name));
fclose($file);
$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);
}
$im_array[$im_count]['small'] = $Small;
$im_array[$im_count]['type'] = $image->imtype;
$im_count++;
$ImageFormat = $image->imtype;
} elseif ($type == "date" || $type == "currentdate" || $type == "datetime" || $type == "currentdatetime") {
${$name} = mktime($_POST['hour'][$ndate], $_POST['minute'][$ndate], $_POST['seconds'][$ndate], $_POST['month'][$ndate], $_POST['day'][$ndate], $_POST['year'][$ndate]);
if (${$name} == -1 || !$_POST['month'][$ndate] || !$_POST['day'][$ndate] || !$_POST['year'][$ndate]) {
unset(${$name});
}
$ndate++;
} elseif ($type == "sqldate") {