function set_input_file($file_name, $type) { parent :: set_input_file($file_name, $type); $this->to_pnm = constant(strtoupper($type . 'TOPNM')) . " $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; }