[eluser]KPowell[/eluser]
That's because the view variables are separate from all other variables. Another way you could do it is to pass the session (or whichever variables you need) as a variable to the view, then access it from there. So, in your controller, it'd be something like:
Code:
$data['userdata'] = $this->session->userdata;
$this->load->view('your/view', $data);
Then, in the view, you could access everything from the $userdata variable.
Personally, whatever it is doing, I would throw that into a controller and pass whatever you need (sounds like an image in this case) as a variable to the view, rather than having the view process anything. That way, all the processing is happening outside of the view.