From d6a98a40e2de8662a18f85a0d61159a0fb4f0226 Mon Sep 17 00:00:00 2001 From: Hannes Magnusson Date: Thu, 24 May 2007 07:38:33 +0000 Subject: [PATCH] Initial imagegrabwindow() & imagegrabscreen docs git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@236223 c90b9560-bf6c-de11-be94-00142212c4b1 --- appendices/migration52.xml | 20 ++- reference/image/functions/imagegrabscreen.xml | 105 +++++++++++++ reference/image/functions/imagegrabwindow.xml | 145 ++++++++++++++++++ 3 files changed, 268 insertions(+), 2 deletions(-) create mode 100644 reference/image/functions/imagegrabscreen.xml create mode 100644 reference/image/functions/imagegrabwindow.xml diff --git a/appendices/migration52.xml b/appendices/migration52.xml index 0bcd61811c..fe553b2ed2 100644 --- a/appendices/migration52.xml +++ b/appendices/migration52.xml @@ -1,5 +1,5 @@ - + Migrating from PHP 5.1.x to PHP 5.2.x @@ -819,12 +819,28 @@ $obj->getCommentName(''); + Image: + + + + imagegrabscreen + - Grabs a screenshot of the whole screen + + + + + imagegrabwindow + - Captures a window. As of PHP 5.2.2. + + + + mbstring: mb_list_encodings_alias_names - - Returns an array of all supported entity encodings + - Returns an array of all supported entity encodings. As of PHP 5.2.2. diff --git a/reference/image/functions/imagegrabscreen.xml b/reference/image/functions/imagegrabscreen.xml new file mode 100644 index 0000000000..db937f9ade --- /dev/null +++ b/reference/image/functions/imagegrabscreen.xml @@ -0,0 +1,105 @@ + + + + + imagegrabscreen + Captures the whole screen + + + + &reftitle.description; + + resourceimagegrabscreen + + + + Grabs a screenshot of the whole screen. + + + + + + + &reftitle.returnvalues; + + Returns an image resource identifier on success, &false; on failure. + + + + + + + &reftitle.examples; + + + <function>imagegrabscreen</function> example + + This example demonstrates how to take a screenshot of the current screen + and save it as a png image. + + + +]]> + + + + + + + &reftitle.notes; + + + This function is only available on Windows. + + + + + + &reftitle.seealso; + + + imagegrabwindow + + + + + + + diff --git a/reference/image/functions/imagegrabwindow.xml b/reference/image/functions/imagegrabwindow.xml new file mode 100644 index 0000000000..03c9d84e0b --- /dev/null +++ b/reference/image/functions/imagegrabwindow.xml @@ -0,0 +1,145 @@ + + + + + imagegrabwindow + Captures a window + + + + &reftitle.description; + + resourceimagegrabwindow + intwindow + intclient_area + + + Grabs a window or its client area using a windows handle (HWND property in COM instance) + + + + + &reftitle.parameters; + + + + window + + + The HWND window ID + + + + + client_area + + + Include the client area of the application window + + + + + + + + + &reftitle.returnvalues; + + Returns an image resource identifier on success, &false; on failure. + + + + + &reftitle.errors; + + E_NOTICE is issued if window_handle is invalid + window handle. + E_WARNING is issued if the Windows API is too old. + + + + + &reftitle.examples; + + + <function>imagegrabwindow</function> example + + Capture a window (IE for example) + + +HWND; +$browser->Visible = true; +$im = imagegrabwindow($handle); +$browser->Quit(); +imagepng($im, "iesnap.png"); +?> +]]> + + + Capture a window (IE for example) but with its content + + +HWND; +$browser->Visible = true; +$browser->Navigate("http://www.libgd.org"); + +/* Still working? */ +while ($browser->Busy) { + com_message_pump(4000); +} +$im = imagegrabwindow($handle, 0); +$browser->Quit(); +imagepng($im, "iesnap.png"); +?> +]]> + + + + + + + &reftitle.notes; + + + This function is only available on Windows. + + + + + + &reftitle.seealso; + + + imagegrabscreen + + + + + + +