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/gf/dev_guide/img/img_write_file.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/gf/dev_guide/img/img_write_file.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/gf/dev_guide/img/img_write_file.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/gf/dev_guide/img/img_write_file.html on line 8
Encode a frame to a file on the filesystem
#include <img.h>
int img_write_file( img_lib_t ilib,
const char* path,
const img_encode_callouts_t* callouts,
img_t* img );
- ilib
- A handle for the image library, returned by img_lib_attach().
- path
- The full path to the file to create.
- callouts
- A pointer to an img_encode_callouts_t structure that provides system callouts for the encoder. If you specify NULL for this value, the library supplies a set of default callouts.
- img
- The address of an img_t structure describing the frame to be encoded.
img
This function encodes a frame to a file on the filesystem. This function is only capable of encoding a single frame. A codec is chosen based on the extension included in the provided filename.
The file will be automatically unlinked if the encode fails for any reason.
- IMG_ERR_OK
- Success
- IMG_ERR_FILE
- Error accessing path (errno is set).
- IMG_ERR_MEM
- Memory-allocation failure.
- IMG_ERR_FORMAT
- No appropriate codec could be found that handles the extension included in the provided filename. The codec you require could be missing or corrupt.
- IMG_ERR_NOSUPPORT
- Input data format not supported; the codec and application could not agree on an output format.
- IMG_ERR_TRUNC
- Error writing data; file was truncated.
- IMG_ERR_INTR
- Encode was interrupted by application.
Image library
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
img_encode_callouts_t,
img_t,
img_lib_attach()
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/gf/dev_guide/img/img_write_file.html on line 153
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/gf/dev_guide/img/img_write_file.html on line 153