continuacion:
Código PHP:
public function convert_colorize($tint_r=0, $tint_g=0, $tint_b=0, $tint_alpha=0)
{
if ($this->image_object) {
imagefilter ($this->image_object, IMG_FILTER_COLORIZE, $tint_r, $tint_g, $tint_b);
return true;
} else {
return false;
}
}
public function convert_negate()
{
if ($this->image_object) {
imagefilter ($this->image_object, IMG_FILTER_NEGATE);
return true;
} else {
return false;
}
}
public function convert_grayscale()
{
if ($this->image_object) {
imagefilter ($this->image_object, IMG_FILTER_GRAYSCALE);
return true;
} else {
return false;
}
}
public function convert_brightness($level)
{
if ($this->image_object) {
imagefilter ($this->image_object, IMG_FILTER_BRIGHTNESS, $level);
return true;
} else {
return false;
}
}
public function convert_contrast($level)
{
if ($this->image_object) {
imagefilter ($this->image_object, IMG_FILTER_CONTRAST, $level);
return true;
} else {
return false;
}
}
public function convert_edgedetect()
{
if ($this->image_object) {
imagefilter ($this->image_object, IMG_FILTER_EDGEDETECT);
return true;
} else {
return false;
}
}
public function convert_emboss()
{
if ($this->image_object) {
imagefilter ($this->image_object, IMG_FILTER_EMBOSS);
return true;
} else {
return false;
}
}
public function convert_gaussian_blur()
{
if ($this->image_object) {
imagefilter ($this->image_object, IMG_FILTER_GAUSSIAN_BLUR);
return true;
} else {
return false;
}
}
public function convert_selective_blur()
{
if ($this->image_object) {
imagefilter ($this->image_object, IMG_FILTER_SELECTIVE_BLUR);
return true;
} else {
return false;
}
}
public function convert_mean_removal()
{
if ($this->image_object) {
imagefilter ($this->image_object, IMG_FILTER_MEAN_REMOVAL);
return true;
} else {
return false;
}
}
public function convert_smooth($level)
{
if ($this->image_object) {
imagefilter ($this->image_object, IMG_FILTER_SMOOTH, $level);
return true;
} else {
return false;
}
}
public function save_png($filename, $overwrite)
{
if (!$overwrite and file_exists($filename)) {
return false;
}
if ($this->image_object) {
imagepng($this->image_object, $filename);
return true;
} else {
return false;
}
}
public function save_gd2($filename, $overwrite)
{
if (!$overwrite and file_exists($filename)) {
return false;
}
if ($this->image_object) {
imagegd2($this->image_object, $filename);
return true;
} else {
return false;
}
}
public function save_gd($filename, $overwrite)
{
if (!$overwrite and file_exists($filename)) {
return false;
}
if ($this->image_object) {
imagegd($this->image_object, $filename);
return true;
} else {
return false;
}
}
public function save_gif($filename, $overwrite)
{
if (!$overwrite and file_exists($filename)) {
return false;
}
if ($this->image_object) {
imagegif($this->image_object, $filename);
return true;
} else {
return false;
}
}
public function save_jpeg($filename, $overwrite)
{
if (!$overwrite and file_exists($filename)) {
return false;
}
if ($this->image_object) {
imagejpeg($this->image_object, $filename);
return true;
} else {
return false;
}
}
}
continua>>>