Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/wid_build/api/alloc_image.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/wid_build/api/alloc_image.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/wid_build/api/alloc_image.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/wid_build/api/alloc_image.html on line 8
A function exported by PhAB to allocate memory for an image
PhImage_t* alloc_image (
PhImage_t *src );
- src
- The PhImage_t image
for which you want to allocate memory.
This function is exported from PhAB in the PhABResExportCommon_t structure.
This function allocates a new Photon image, based on the src image. The src image is duplicated: the function allocates a new palette, a new alpha map, etc.
After an image is allocated with alloc_image(), you
are free to modify it. If you need to allocate memory for the image
palette, image data, or alpha map, use the alloc_mem() function.
|
The newly allocated image will have the flags member
set to Ph_RELEASE_IMAGE_ALL, meaning that all the
fields of the new image that required allocating memory will be
released when the image is released. |
You should free the image with the PhAB exported free_image() function.
A pointer to the image, or NULL when an error
occurs.
Photon
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
alloc_mem(),
free_image(),
PhABResExportCommon_t,
PhImage_t
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/wid_build/api/alloc_image.html on line 113
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/wid_build/api/alloc_image.html on line 113