function set_output_file($file_name, &$type) { parent :: set_output_file($file_name, $type); $this->from_pnm = ''; if (strtoupper($type) == 'GIF') $this->from_pnm = PNMQUANT . ' 256 | '; $this->from_pnm .= constant(strtoupper('PNMTO' . $type)) . " > $file_name"; }
function set_input_file($file_name, $type = '') { if (empty($type)) { $info = getimagesize($file_name); $type = $this->image_types[$info[2]]; } if (!parent :: set_input_file($file_name, $type)) return false; $create_func = "ImageCreateFrom{$type}"; $this->image = $create_func($this->input_file); return true; }