diff --git a/reference/image/functions/exif-read-data.xml b/reference/image/functions/exif-read-data.xml index 9b0d2f5d8d..dde831f353 100644 --- a/reference/image/functions/exif-read-data.xml +++ b/reference/image/functions/exif-read-data.xml @@ -1,5 +1,5 @@ - + @@ -90,6 +90,11 @@ idea of how to actually tag their images, so you can't always rely on a specific Exif header being present. + + Windows ME/XP both can wipe the Exif headers when connecting to a camera. + More information available at &url.winexif;. + diff --git a/reference/image/functions/gd-info.xml b/reference/image/functions/gd-info.xml index e217a78c2c..b8fc4e9c8b 100644 --- a/reference/image/functions/gd-info.xml +++ b/reference/image/functions/gd-info.xml @@ -1,5 +1,5 @@ - + gd_info @@ -92,10 +92,14 @@ +]]> + + + The typical output is : + + + string(24) "bundled (2.0 compatible)" @@ -116,15 +120,12 @@ array(9) { ["XBM Support"]=> bool(false) } - -*/ -?> ]]> - + - See also: imagepng, + See also imagepng, imagejpeg, imagegif, imagewbmp, and diff --git a/reference/image/functions/getimagesize.xml b/reference/image/functions/getimagesize.xml index 3cd3df41a5..7fd9b942f5 100644 --- a/reference/image/functions/getimagesize.xml +++ b/reference/image/functions/getimagesize.xml @@ -1,5 +1,5 @@ - + @@ -62,7 +62,11 @@ echo ""; ]]> diff --git a/reference/image/functions/image-type-to-mime-type.xml b/reference/image/functions/image-type-to-mime-type.xml index c8db8a6044..929d4d9f84 100644 --- a/reference/image/functions/image-type-to-mime-type.xml +++ b/reference/image/functions/image-type-to-mime-type.xml @@ -1,5 +1,5 @@ - + @@ -27,18 +27,101 @@ header ("Content-type: ".image_type_to_mime_type (IMAGETYPE_PNG)); + + The returned values are as follows + + Returned values Constants + + + + imagetype + Returned value + + + + + IMAGETYPE_GIF + image/gif + + + IMAGETYPE_JPEG + image/jpeg + + + IMAGETYPE_PNG + image/png + + + IMAGETYPE_SWF + application/x-shockwave-flash + + + IMAGETYPE_PSD + image/psd + + + IMAGETYPE_BMP + image/bmp + + + IMAGETYPE_TIFF_II (intel byte order) + image/tiff + + + + IMAGETYPE_TIFF_MM (motorola byte order) + + image/tiff + + + IMAGETYPE_JPC + application/octet-stream + + + IMAGETYPE_JP2 + image/jp2 + + + IMAGETYPE_JPX + application/octet-stream + + + IMAGETYPE_JB2 + application/octet-stream + + + IMAGETYPE_SWC + application/x-shockwave-flash + + + IMAGETYPE_IFF + image/iff + + + IMAGETYPE_WBMP + image/vnd.wap.wbmp + + + IMAGETYPE_XBM + image/xbm + + + +
+
This function does not require the GD image library. - - See also getimagesize, - exif_imagetype, exif_read_data - and exif_thumbnail. - + + See also getimagesize, + exif_imagetype, + exif_read_data and + exif_thumbnail. +
diff --git a/reference/image/functions/image2wbmp.xml b/reference/image/functions/image2wbmp.xml index d61795e591..e0f4c46e60 100644 --- a/reference/image/functions/image2wbmp.xml +++ b/reference/image/functions/image2wbmp.xml @@ -1,5 +1,5 @@ - + @@ -27,6 +27,23 @@ using header, you can create a PHP script that outputs WBMP images directly. + + + <function>image2wbmp</function> example + + +]]> + + + WBMP support is only available if PHP was compiled diff --git a/reference/image/functions/imagechar.xml b/reference/image/functions/imagechar.xml index aa7f2c2eb2..9abe1a058b 100644 --- a/reference/image/functions/imagechar.xml +++ b/reference/image/functions/imagechar.xml @@ -1,5 +1,5 @@ - + @@ -27,7 +27,33 @@ corresponding to larger fonts). - See also imageloadfont. + + <function>imagechar</function> example + + +]]> + + + + + See also imagecharup and + imageloadfont. diff --git a/reference/image/functions/imagecharup.xml b/reference/image/functions/imagecharup.xml index ae86b3a69f..80327008a0 100644 --- a/reference/image/functions/imagecharup.xml +++ b/reference/image/functions/imagecharup.xml @@ -1,5 +1,5 @@ - + @@ -27,7 +27,33 @@ used. - See also imageloadfont. + + <function>imagecharup</function> example + + +]]> + + + + + See also imagechar and + imageloadfont. diff --git a/reference/image/functions/imagecolorallocate.xml b/reference/image/functions/imagecolorallocate.xml index e4cbda6a49..d055a08e77 100644 --- a/reference/image/functions/imagecolorallocate.xml +++ b/reference/image/functions/imagecolorallocate.xml @@ -1,5 +1,5 @@ - + @@ -23,16 +23,34 @@ function. red, green and blue are the values of the red, green and blue component of the requested color respectively. These parameters are - integers between 0 and 255. + integers between 0 and 255 or hexadecimals between 0x00 and 0xFF. imagecolorallocate must be called to create each color that is to be used in the image represented by image. + + + + The first call to imagecolorallocate fills + the background color. + + + ]]> diff --git a/reference/image/functions/imagecolorclosestalpha.xml b/reference/image/functions/imagecolorclosestalpha.xml index 6b69cc3fe4..11ec6ef68f 100644 --- a/reference/image/functions/imagecolorclosestalpha.xml +++ b/reference/image/functions/imagecolorclosestalpha.xml @@ -1,5 +1,5 @@ - + @@ -20,10 +20,14 @@ Returns the index of the color in the palette of the image which is "closest" to the specified RGB value and alpha level. + + + This function was added in PHP 4.0.6 and requires GD 2.0.1 + + See also imagecolorexactalpha. - This function was added in PHP 4.0.6 and requires GD 2.0.1 diff --git a/reference/image/functions/imagecolorsforindex.xml b/reference/image/functions/imagecolorsforindex.xml index 73b421f86b..84a535091e 100644 --- a/reference/image/functions/imagecolorsforindex.xml +++ b/reference/image/functions/imagecolorsforindex.xml @@ -1,5 +1,5 @@ - + @@ -14,10 +14,52 @@ intindex - This returns an associative array with red, green, and blue keys - that contain the appropriate values for the specified color + This returns an associative array with red, green, blue and alpha + keys that contain the appropriate values for the specified color index. + + + <function>imagecolorsforindex</function> example + +'; +print_r($color_tran); +echo ''; + +?> +]]> + + + This example will output : + + + 226 + [green] => 222 + [blue] => 252 + [alpha] => 0 +) +]]> + + + See also imagecolorat and imagecolorexact. diff --git a/reference/image/functions/imagecreatefromgif.xml b/reference/image/functions/imagecreatefromgif.xml index 8876f4a2d1..9ce8829c3a 100644 --- a/reference/image/functions/imagecreatefromgif.xml +++ b/reference/image/functions/imagecreatefromgif.xml @@ -1,5 +1,5 @@ - + @@ -24,7 +24,7 @@ Example to handle an error during creation (courtesy - vic@zymsys.com) + vic at zymsys dot com) - + @@ -24,7 +24,7 @@ Example to handle an error during creation (courtesy - vic@zymsys.com ) + vic at zymsys dot com ) - + @@ -24,7 +24,7 @@ Example to handle an error during creation (courtesy - vic@zymsys.com) + vic at zymsys dot com) - + @@ -24,7 +24,7 @@ Example to handle an error during creation (courtesy - vic@zymsys.com) + vic at zymsys dot com) - + @@ -46,7 +46,53 @@ beginning and ending angles should be connected to the center - this is a good way to outline (rather than fill) a 'pie slice'. - This function was added in PHP 4.0.6 and requires GD 2.0.1 + + + Creating a 3D looking pie + + 50; $i--) { + imagefilledarc($image, 50, $i, 100, 50, 0, 45, $darknavy, IMG_ARC_PIE); + imagefilledarc($image, 50, $i, 100, 50, 45, 75 , $darkgray, IMG_ARC_PIE); + imagefilledarc($image, 50, $i, 100, 50, 75, 360 , $darkred, IMG_ARC_PIE); +} + +imagefilledarc($image, 50, 50, 100, 50, 0, 45, $navy, IMG_ARC_PIE); +imagefilledarc($image, 50, 50, 100, 50, 45, 75 , $gray, IMG_ARC_PIE); +imagefilledarc($image, 50, 50, 100, 50, 75, 360 , $red, IMG_ARC_PIE); + + +// flush image +header('Content-type: image/png'); +imagepng($image); +imagedestroy($image); +?> +]]> + + + + + + This function was added in PHP 4.0.6 and requires GD 2.0.1 + + diff --git a/reference/image/functions/imagefilledellipse.xml b/reference/image/functions/imagefilledellipse.xml index ceec8cd6e9..43a6effd24 100644 --- a/reference/image/functions/imagefilledellipse.xml +++ b/reference/image/functions/imagefilledellipse.xml @@ -1,5 +1,5 @@ - + @@ -25,7 +25,11 @@ ellipse's width and height respectively. The ellipse is filled using color - This function was added in PHP 4.0.6 and requires GD 2.0.1 or later + + + This function was added in PHP 4.0.6 and requires GD 2.0.1 or later + + See also imagefilledarc. diff --git a/reference/image/functions/imagefilledpolygon.xml b/reference/image/functions/imagefilledpolygon.xml index 91614a6882..27f1a5f465 100644 --- a/reference/image/functions/imagefilledpolygon.xml +++ b/reference/image/functions/imagefilledpolygon.xml @@ -1,5 +1,5 @@ - + @@ -23,6 +23,51 @@ = x1, points[3] = y1, etc. num_points is the total number of vertices. + + + <function>imagefilledpolygon</function> example + + 40, // x1 + 1 => 50, // y1 + 2 => 20, // x2 + 3 => 240, // y2 + 4 => 60, // x3 + 5 => 60, // y3 + 6 => 240, // x4 + 7 => 20, // y4 + 8 => 50, // x5 + 9 => 40, // y5 + 10 => 10, // x6 + 11 => 10, // y6 +); + +// create image +$im = imagecreate(250, 250); + +// some colors +$bg = imagecolorallocate($im, 255, 255, 255); +$blue = imagecolorallocate($im, 0, 0, 255); + +// draw a polygon +imagefilledpolygon($im, $values, 6, $blue ); + +// flush image +header('Content-type: image/png'); +imagepng($im); +imagedestroy($im); + +?> +]]> + + +