IMAGEGRABWINDOW(3) 1 IMAGEGRABWINDOW(3)imagegrabwindow - Captures a windowSYNOPSIS
resource imagegrabwindow (int $window_handle, [int $client_area])
DESCRIPTION
Grabs a window or its client area using a windows handle (HWND property in COM instance)
PARAMETERS
o $window_handle
- The HWND window ID.
o $client_area
- Include the client area of the application window.
RETURN VALUES
Returns an image resource identifier on success, FALSE on failure.
ERRORS /EXCEPTIONS
E_NOTICE is issued if $window_handle is invalid window handle. E_WARNING is issued if the Windows API is too old.
EXAMPLES
Example #1
imagegrabwindow(3) example
Capture a window (IE for example)
<?php
$browser = new COM("InternetExplorer.Application");
$handle = $browser->HWND;
$browser->Visible = true;
$im = imagegrabwindow($handle);
$browser->Quit();
imagepng($im, "iesnap.png");
imagedestroy($im);
?>
Capture a window (IE for example) but with its content
<?php
$browser = new COM("InternetExplorer.Application");
$handle = $browser->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");
imagedestroy($im);
?>
NOTES
Note
This function is only available on Windows.
SEE ALSO imagegrabscreen(3).
PHP Documentation Group IMAGEGRABWINDOW(3)
Check Out this Related Man Page
IMAGESAVEALPHA(3) 1 IMAGESAVEALPHA(3)imagesavealpha - Set the flag to save full alpha channel information (as opposed to single-color transparency) when saving PNG imagesSYNOPSIS
bool imagesavealpha (resource $image, bool $saveflag)
DESCRIPTION imagesavealpha(3) sets the flag to attempt to save full alpha channel information (as opposed to single-color transparency) when saving PNG
images.
You have to unset alphablending ( imagealphablending($im, false)), to use it.
Alpha channel is not supported by all browsers, if you have problem with your browser, try to load your script with an alpha channel com-
pliant browser, e.g. latest Mozilla.
PARAMETERS
o $
image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3).
o $saveflag
- Whether to save the alpha channel or not. Default to FALSE.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
imagesavealpha(3) example
<?php
// Load a png image with alpha channels
$png = imagecreatefrompng('./alphachannel_example.png');
// Do required operations
// Turn off alpha blending and set alpha flag
imagealphablending($png, false);
imagesavealpha($png, true);
// Output image to browser
header('Content-Type: image/png');
imagepng($png);
imagedestroy($png);
?>
NOTES
Note
This function requires GD 2.0.1 or later (2.0.28 or later is recommended).
SEE ALSO imagealphablending(3).
PHP Documentation Group IMAGESAVEALPHA(3)
Dear all,
I can only use text-based terminal, x-window is not support my session. Do anyone know have any text-based Internet browser in Sparc sun?
Regards
Wilson (2 Replies)
Hi guys, I have a remote server that I control using either a browser or telnet. And I have an .sh file that I would like to run from a PHP on my browser. Is there any way to do this?
Sorry I am really clueless when it comes to Unix.
I've been a windows user all my life. (1 Reply)
Dear friends,
I ma using linux os.
my browser is mozilla firebird .
since last one week my browser is not working.
if i send mail through outlook some buttons like send , refresh are not working.
and yahoo mail also not logging on.
please help (2 Replies)
hi all
i am opning a browser like www.example.com
i would like to open this browser slowly (wait mode)
how can i do this.
is there any option like wait for some time that to 5sec.,10 sec. like (1 Reply)
Hi, i have just installed Sun Solaris 8 on the sun sparc server but when i run the browers and write a site to open it my browers automatically closed and when i run the browers window again it again automatically closed again.
can any body help me to resolve this issue (1 Reply)
Dear All ,
I have a web Application which I used in my work it's installed on an AIX machine .
I need to access this application from my home when I connect to my work via VPN , but the browser not work at all .
I did a work around by installing mozilla broswer on the AIX machine and make... (2 Replies)
All:
Have an HP-UX server running init level 3, dtlogin shows up in ps -ef, but when you try to connect to this server via X browser (on Win XP), the browser comes up with just a gray screen w/mouse pointer.
All the other HP-UX boxes on the same subnet come up with a pretty dtlogin screen.
... (4 Replies)
I just would like to have a javascript function ( for user logout ) which can close the browser that the user run this function , for example , if the user is using IE to click this function , then close ALL IE browser , is it possible ? if it can not be make , could the function close ALL opened... (2 Replies)