php man page for imagecreatefromgd2part

Query: imagecreatefromgd2part

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

IMAGECREATEFROMGD2PART(3)						 1						 IMAGECREATEFROMGD2PART(3)

imagecreatefromgd2part - Create a new image from a given part of GD2 file or URL

SYNOPSIS
resource imagecreatefromgd2part (string $filename, int $srcX, int $srcY, int $width, int $height)
DESCRIPTION
Create a new image from a given part of GD2 file or URL. Tip A URL can be used as a filename with this function if the fopen wrappers have been enabled. See fopen(3) for more details on how to specify the filename. See the "Supported Protocols and Wrappers" for links to information about what abilities the various wrappers have, notes on their usage, and information on any predefined variables they may provide.
PARAMETERS
o $filename - Path to the GD2 image. o $srcX - x-coordinate of source point. o $srcY - y-coordinate of source point. o $width -Source width. o $height -Source height.
RETURN VALUES
Returns an image resource identifier on success, FALSE on errors.
EXAMPLES
Example #1 imagecreatefromgd2part(3) example <?php // For this example we need the image size before $image = getimagesize('./test.gd2'); // Create the image instance now we got the image // sizes $im = imagecreatefromgd2part('./test.gd2', 4, 4, ($image[0] / 2) - 6, ($image[1] / 2) - 6); // Do an image operation, in this case we emboss the // image if PHP 5+ if(function_exists('imagefilter')) { imagefilter($im, IMG_FILTER_EMBOSS); } // Save optimized image imagegd2($im, './test_emboss.gd2'); imagedestroy($im); ?>
NOTES
Note This function requires GD 2.0.1 or later (2.0.28 or later is recommended). PHP Documentation Group IMAGECREATEFROMGD2PART(3)
Related Man Pages
imagecreatefromxbm(3) - php
imagecreatefromwbmp(3) - php
imagecreatefromxpm(3) - php
imagegd2(3) - php
imageistruecolor(3) - php
Similar Topics in the Unix Linux Community
GetImageSize() with Unix?
The Geek&amp;Poke Instant SEO Tip Of The Week
Tips For Parents Of Geeks - Tip 1
The Geek&amp;Poke Project Management Tip Of The Week
The Geek&amp;Poke Tip For Final Exams