I am trying to convert a string to an image using the "imagecreatefromstring
" function
(I've attached the code below). It works for most images, but when I try to convert
larger images, a small portion of the image does not get converted (the lower part
of the image is just grey)
benim kod (php.net örnek al) olan:
$data = base64_decode($record['text']);
$im = imagecreatefromstring($data);
if ($im !== false) {
header('Content-Type: image/jpeg');
imagejpeg($im);
imagedestroy($im);
}
Ben de bir değil pice dize çözmek için farklı bir yol deneyin, ama dize bölme ve sonra çözmek.
for($i=0, $len=strlen($record['text']); $i<$len; $i+=4){
$data.= base64_decode( substr($record['text'], $i, 4) );
}