Haensel, on 20 August 2012 - 12:26 PM, said:
I am sorry for confusing you
I ment that I once created this extension:
http://www.yiiframew...nsion/ephpthumb which is a wrapper for phpThumb. phpThub provides you with a show() method that is exactly doing what you want. You could write an action in Yii that is using the show() method to directly output an image (as a preview before it is saved etc.). The code would look like this:
public function actionShowImage($fileName)
{
$thumb=Yii::app()->phpThumb->create('../images/'.$fileName);
$thumb->show();
}
Hope it helps
ah yeah, got you, but actually i'm using couchDB and the image is already there. and when i rend this image using the rendrer method as follow
public function render($filename, $die=true) {
header("Content-type: ".$this->getContentType($filename));
header('Content-Disposition: inline; filename="'.$filename.'"');
echo($this->getBinary($filename));
}
the problem is the image is sent as attachment and it shows only the image in the browser, so i need to use that image in <img/> tag.