Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/05/2009, 18:45
Avatar de Fernand0
Fernand0
 
Fecha de Ingreso: septiembre-2005
Ubicación: Buenos Aires
Mensajes: 610
Antigüedad: 18 años, 7 meses
Puntos: 19
No me resamplea PNG

Código PHP:
    function Parse($File)
    {
        if(!
is_dir($this->_To.'['.$this->Max['Setted'].']')) mkdir($this->_To.'['.$this->Max['Setted'].']');
        
        
$Type=substr($File, -3);
        
        if(
$Type=='jpg' || $Type=='peg') { $this->Img=imagecreatefromjpeg($this->From.'/'.$File); }
        else if(
$Type=='png') { $this->Img=imagecreatefrompng($this->From.'/'.$File); }
        else if(
$Type=='gif') { $this->Img=imagecreatefromgif($this->From.'/'.$File); }
        else if(
$Type=='bmp') { $this->Img=imagecreatefromwbmp($this->From.'/'.$File); }
        
        
$this->Calc();
        
$Created=imagecreatetruecolor($this->w$this->h);
        
imagecopyresampled($Created$this->Img0000$this->w$this->h$this->Max['w'], $this->Max['h']);
        
        if(
$Type=='jpg' || $Type=='peg') { imagejpeg($Created$this->_To.'['.$this->Max['Setted'].']/'.$File100); }
        else if(
$Type=='png') { imagepng($Created$this->_To.'['.$this->Max['Setted'].']/'.$File); }
        else if(
$Type=='gif') { imagegif($Created$this->_To.'['.$this->Max['Setted'].']/'.$File); }
        else if(
$Type=='bmp') { imagewbmp($Created$this->_To.'['.$this->Max['Setted'].']/'.$File); }
        
        
imagedestroy($Created); imagedestroy($this->Img);
    } 
Por alguna razon, funciona solo con .jpg(esto indica que el resto del codigo esta bien)
Cual es el problema? :S

Saludos