Ver Mensaje Individual
  #3 (permalink)  
Antiguo 30/06/2009, 15:59
easy
 
Fecha de Ingreso: diciembre-2008
Mensajes: 454
Antigüedad: 16 años
Puntos: 2
Respuesta: Tratamiento de Imagenes, como hacer que se vea de dos maneras

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_objectIMG_FILTER_COLORIZE$tint_r$tint_g$tint_b);
            return 
true;
        } else {
            return 
false;
        }        
    }


    public function 
convert_negate()
    {
        if (
$this->image_object) {
            
imagefilter ($this->image_objectIMG_FILTER_NEGATE);
            return 
true;
        } else {
            return 
false;
        }
    }

    public function 
convert_grayscale()
    {
        if (
$this->image_object) {
            
imagefilter ($this->image_objectIMG_FILTER_GRAYSCALE);
            return 
true;
        } else {
            return 
false;
        }
    }


    public function 
convert_brightness($level)
    {
        if (
$this->image_object) {
            
imagefilter ($this->image_objectIMG_FILTER_BRIGHTNESS$level);
            return 
true;
        } else {
            return 
false;
        }
    }


    public function 
convert_contrast($level)
    {
        if (
$this->image_object) {
            
imagefilter ($this->image_objectIMG_FILTER_CONTRAST$level);
            return 
true;
        } else {
            return 
false;
        }
    }


    public function 
convert_edgedetect()
    {
        if (
$this->image_object) {
            
imagefilter ($this->image_objectIMG_FILTER_EDGEDETECT);
            return 
true;
        } else {
            return 
false;
        }
    }


    public function 
convert_emboss()
    {
        if (
$this->image_object) {
            
imagefilter ($this->image_objectIMG_FILTER_EMBOSS);
            return 
true;
        } else {
            return 
false;
        }
    }

    public function 
convert_gaussian_blur()
    {
        if (
$this->image_object) {
            
imagefilter ($this->image_objectIMG_FILTER_GAUSSIAN_BLUR);
            return 
true;
        } else {
            return 
false;
        }
    }

    public function 
convert_selective_blur()
    {
        if (
$this->image_object) {
            
imagefilter ($this->image_objectIMG_FILTER_SELECTIVE_BLUR);
            return 
true;
        } else {
            return 
false;
        }
    }

    public function 
convert_mean_removal()
    {
        if (
$this->image_object) {
            
imagefilter ($this->image_objectIMG_FILTER_MEAN_REMOVAL);
            return 
true;
        } else {
            return 
false;
        }
    }

    public function 
convert_smooth($level)
    {
        if (
$this->image_object) {
            
imagefilter ($this->image_objectIMG_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>>>