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
Post a Comment