Query: imagecreatefromstring
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
IMAGECREATEFROMSTRING(3) 1 IMAGECREATEFROMSTRING(3) imagecreatefromstring - Create a new image from the image stream in the stringSYNOPSISresource imagecreatefromstring (string $image)DESCRIPTIONimagecreatefromstring(3) returns an image identifier representing the image obtained from the given $image. These types will be automati- cally detected if your build of PHP supports them: JPEG, PNG, GIF, WBMP, and GD2.PARAMETERSo $image - A string containing the image data.RETURN VALUESAn image resource will be returned on success. FALSE is returned if the image type is unsupported, the data is not in a recognised for- mat, or the image is corrupt and cannot be loaded.EXAMPLESExample #1 imagecreatefromstring(3) example <?php $data = 'iVBORw0KGgoAAAANSUhEUgAAABwAAAASCAMAAAB/2U7WAAAABl' . 'BMVEUAAAD///+l2Z/dAAAASUlEQVR4XqWQUQoAIAxC2/0vXZDr' . 'EX4IJTRkb7lobNUStXsB0jIXIAMSsQnWlsV+wULF4Avk9fLq2r' . '8a5HSE35Q3eO2XP1A1wQkZSgETvDtKdQAAAABJRU5ErkJggg=='; $data = base64_decode($data); $im = imagecreatefromstring($data); if ($im !== false) { header('Content-Type: image/png'); imagepng($im); imagedestroy($im); } else { echo 'An error occurred.'; } ?> The above example will output something similar to:[NOT DISPLAYABLE MEDIA]Output of example : imagecreatefromstring()SEE ALSOimagecreatefromjpeg(3), imagecreatefrompng(3), imagecreatefromgif(3), imagecreatetruecolor(3). PHP Documentation Group IMAGECREATEFROMSTRING(3)
Related Man Pages |
---|
imagecreate(3) - php |
imagecreatefromstring(3) - php |
imageconvolution(3) - php |
imagecreatefromjpeg(3) - php |
imagefilledpolygon(3) - php |
Similar Topics in the Unix Linux Community |
---|
Create an Ignite image on tape from Online IgniteUX image |
Pixane 0.7 (Default branch) |
mksysb file image |
mksysb installation(clone) on a different server |
Help with blobbing |