Creates a new image (icon, cursor, or bitmap) and copies the attributes of the specified image to the new one
_WinAPI_CopyImage ( $hImage [, $iType = 0 [, $iXDesiredPixels = 0 [, $iYDesiredPixels = 0 [, $iFlags = 0]]]] )
|$hImage||Handle to the image to be copied.|
|$iType||[optional] Specifies the type of image to be copied. This parameter can be one of the following values:
|$iXDesiredPixels||[optional] Specifies the desired width, in pixels, of the image. If this is zero (Default), then the returned image will have the same width as the original $hImage.|
|$iYDesiredPixels||[optional] Specifies the desired height, in pixels, of the image. If this is zero (Default), then the returned image will have the same height as the original $hImage.|
|$iFlags||[optional] This parameter can be one or more of the following values.
|Success:||Handle to the newly created image.|
|Failure:||0, call _WinAPI_GetLastError() to get extended error information.|
When you are finished using the resource, you can release its associated memory by calling _WinAPI_DeleteObject() function respectively for bitmaps, cursors, or icons.
The system automatically deletes the resource when its process terminates, however, calling the appropriate function saves memory and decreases the size of the process's working set.
Search CopyImage in MSDN Library.