IMAGECREATEFROMSTRING(3) 1 IMAGECREATEFROMSTRING(3)imagecreatefromstring - Create a new image from the image stream in the stringSYNOPSIS
resource imagecreatefromstring (string $image)
DESCRIPTION imagecreatefromstring(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.
PARAMETERS
o $image
- A string containing the image data.
RETURN VALUES
An 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.
EXAMPLES
Example #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 ALSO imagecreatefromjpeg(3), imagecreatefrompng(3), imagecreatefromgif(3), imagecreatetruecolor(3).
PHP Documentation Group IMAGECREATEFROMSTRING(3)
Check Out this Related Man Page
IMAGESETTILE(3) 1 IMAGESETTILE(3)imagesettile - Set the tile image for fillingSYNOPSIS
bool imagesettile (resource $image, resource $tile)
DESCRIPTION imagesettile(3) sets the tile image to be used by all region filling functions (such as imagefill(3) and imagefilledpolygon(3)) when fill-
ing with the special color IMG_COLOR_TILED.
A tile is an image used to fill an area with a repeated pattern. Any GD image can be used as a tile, and by setting the transparent color
index of the tile image with imagecolortransparent(3), a tile allows certain parts of the underlying area to shine through can be created.
Note
You need not take special action when you are finished with a tile, but if you destroy the tile image, you must not use the
IMG_COLOR_TILED color until you have set a new tile image!
PARAMETERS
o $
image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3).
o $tile
- The image resource to be used as a tile.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
imagesettile(3) example
<?php
// Load an external image
$zend = imagecreatefromgif('./zend.gif');
// Create a 200x200 image
$im = imagecreatetruecolor(200, 200);
// Set the tile
imagesettile($im, $zend);
// Make the image repeat
imagefilledrectangle($im, 0, 0, 199, 199, IMG_COLOR_TILED);
// Output image to the browser
header('Content-Type: image/png');
imagepng($im);
imagedestroy($im);
imagedestroy($zend);
?>
The above example will output something similar to:[NOT DISPLAYABLE MEDIA]Output of example : imagesettile()
PHP Documentation Group IMAGESETTILE(3)
Hello Folks!
Problem in getting image size by using getimagesize() function in PHP, the function is working fine on windows OS, but returning nothing on Unix OS, Please guide me how I could get image size/dimensions on Unix OS, as long as I have understood the problem, it is basically the path... (1 Reply)
Hi, (HP-UX 11.11)
I need to create a tape image of an igniteUX image created on our igniteUX server.
That is to say. I have a "Online" image of the igniteUX of the targeted system but I now need to copy it to a useable TAPE (igniteUX) image so i can build an other server from it that is not... (3 Replies)
Discussion started by: Andrek
3 Replies
3. Post Here to Contact Site Administrators and Moderators
Hi,
I am unable to view/open the image I uploded in one of the forums.
https://www.unix.com/showthread.php?t=37793&page=2&pp=20
Please help.
enc. (2 Replies)
Hello,
I have an mksysb image in my disk, created like:
# mksysb -i /mnt/backup/lpar2.image
I want to know if this image could be copied to a tape and make it a boot image.
Thanks
Enzote (3 Replies)
if VG_SOURCE_DISK_LIST varaible(value set to = hdisk1 hdisk0 )is set in image.data file when taking mksysb image backup on a source server and if we use this image to install it on a different server(clone). Does it warn during installation on the target server if it doesn't have disks hdisk1 and... (1 Reply)
I 'm new to linux .. can some one tell how can we create a linux image like solaris flash archive and then use it with kickstart server to build multiple clients
from same image ?
Thanks (4 Replies)
I am trying to run an old script to modify an image file with a modified header to bypass the md5 check but it comes up with an error message. The image file is for use on a Expressgate SSD so that I can add sqx files to it. This is a link from where I got the script:-... (3 Replies)
I am pretty new to scripting and i was wondering if anyone could help me out.
Here is the situation. I am trying to make an action folder that when an image is saved to it, the image is automatically moved to a folder based upon the first 4 or 5 integers of the name.
image names come in a... (2 Replies)
Hi Experts,
I am very new to AIX, I have a mksysb image in one of my aix server (V6), I would like to install this mksysb image on newly lpar. Is it possible without tape and NIM?
Advice would be appreciated.
Regards,
Rockie (11 Replies)