PHP get image from byte[] out of a Database -


i want display image php-script. image data out of database. data byte[]. know how this?

i tried yet:

function getimage($imagedataarray) {    $base64string = "";    for($i = 0; $i < count($imagedataarray); $i++)    {        $string = trim(strtr(base64_encode($imagedataarray[$i]), '+/', '-_'), '=');         $base64string .= $string;    }     return 'data:image/png;base64,' . $base64string ; } 

and call here:

echo '<img src="'.$im->getimage($imagedataarray).'" alt="picture" />'; 

but don't result. picture not shown.

this might imagick::readimageblob


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -