Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

generate imagegrabwindow #302

Merged
merged 2 commits into from
Oct 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,4 @@
"dev-master": "0.1-dev"
}
}
}
}
1 change: 1 addition & 0 deletions generated/functionsList.php
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@
'imagegd2',
'imagegif',
'imagegrabscreen',
'imagegrabwindow',
'imagejpeg',
'imagelayereffect',
'imageline',
Expand Down
20 changes: 20 additions & 0 deletions generated/image.php
Original file line number Diff line number Diff line change
Expand Up @@ -1845,6 +1845,26 @@ function imagegrabscreen()
}


/**
* Grabs a window or its client area using a windows handle (HWND property in COM instance)
*
* @param int $handle The HWND window ID.
* @param bool $client_area Include the client area of the application window.
* @return \GdImage Returns an image object on success, FALSE on failure.
* @throws ImageException
*
*/
function imagegrabwindow(int $handle, bool $client_area = false): \GdImage
{
error_clear_last();
$result = \imagegrabwindow($handle, $client_area);
if ($result === false) {
throw ImageException::createFromPhpError();
}
return $result;
}


/**
* imagejpeg creates a JPEG file from
* the given image.
Expand Down
1 change: 0 additions & 1 deletion generator/config/ignoredFunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@
'apcu_delete', // apcu_delete returns false when the $key does not exist in the cache store
'filter_has_var', // this function is meant to return a boolean
'array_multisort', // this function is too buggy, see PR #113 on GitHub
'imagegrabwindow',
];
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
'imagerotate' => ['resource|false', 'src_im'=>'resource', 'angle'=>'float', 'bgdcolor'=>'int', 'ignoretransparent='=>'bool'], //ignoretransparent is a bool instead of a int
'pg_pconnect' => ['resource|false', 'connection_string'=>'string', 'flags' => 'int'], //flags is an int instead of a string
'get_headers' => ['array|false', 'url'=>'string', 'format='=>'bool', 'context='=>'resource'], // format is a bool instead of int
'imagegrabwindow' => ['GdImage|false', 'handle'=>'int', 'client_area'=>'bool'], // client_ara is a bool instead of an int
];
1 change: 1 addition & 0 deletions rector-migrate.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@
'imagegd2' => 'Safe\imagegd2',
'imagegif' => 'Safe\imagegif',
'imagegrabscreen' => 'Safe\imagegrabscreen',
'imagegrabwindow' => 'Safe\imagegrabwindow',
'imagejpeg' => 'Safe\imagejpeg',
'imagelayereffect' => 'Safe\imagelayereffect',
'imageline' => 'Safe\imageline',
Expand Down