How to retrive image which store on database in BLOB form ??
Answered by diafol 3,720 in a post from
Jump to Post
for direct output...(for a jpeg - but could be imagegif, imagepng etc)
$img = imagecreatefromstring($dbData); ob_start(); imagejpeg($img, null); $out = ob_get_contents(); ob_end_clean(); $output = "<img src="data:image/jpg;base64,' . base64_encode($out) . '" />'; //... echo $output;
All 2 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.