I'm trying to load a captcha image passing controller to view.The code of my controller
$captcha_data['image'] = $this->captcha_security_model->get_captcha($width,$height,$characters);
// header('Content-Type: image/jpeg');
// imagejpeg($captcha_data['image']);
// imagedestroy($captcha_data['image']);
$this->load->view('captcha_view',$captcha_data);
Uncommenting that three line showing the image in full page mode.The code of my view:
<?php
echo $image;
?>
<img src="" />
<form action="" method="post">
<input type="text" name="word" />
<input type="submit" name="submit" value="submit" />
</form>
Loading from view is somehow failed.This code gives me this:

captcha_security_model? you know codeigniter already has a helper for that ? maybe something is wrong with your model !captcha_security_modelis ok. because uncommenting those 3 lines gives me a captcha image.