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_decode_frame.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_decode_frame.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_decode_frame.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_decode_frame.html on line 8
Decode a frame
#include <img.h>
int img_decode_frame(
img_codec_t codec,
io_stream_t* input,
const img_decode_callouts_t* callouts,
img_t* img,
uintptr_t* decode_data );
- codec
- The handle of the codec to use to decode the frame.
- input
- The input source.
- callouts
- A pointer to an img_decode_callouts_t structure that provides system callouts for the decoder. If you pass NULL for this value, a set of default callouts is used. See the description of img_decode_callouts_t for more details.
- img
- The address of an img_t structure to fill with information regarding the decoded frame.
- decode_data
- The address of the uintptr_t that was used for img_decode_begin().
img
This function decodes a frame. You need to call img_decode_begin() first to prepare for the decode, and img_decode_finish() to release any resources allocated for the decode.
- IMG_ERR_OK
- Success. The complete frame was decoded.
- IMG_ERR_MEM
- Memory-allocation failure.
- IMG_ERR_NOSUPPORT
- Output data format not supported; the codec and application could not agree on an output format.
- IMG_ERR_NODATA
- No frame data was present. This return code indicates the end of a multi-frame data source.
- IMG_ERR_CORRUPT
- Invalid data was encountered in the stream, preventing the decode from proceeding. Some of the frame may be intact.
- IMG_ERR_TRUNC
- Premature end of data encountered. Some of the frame may be intact.
- IMG_ERR_INTR
- Decoding was interrupted by the application.
- IMG_ERR_DLL
- Error accessing the codec DLL; check errno and/or try running your application with DL_DEBUG=1.
Image library
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
img_decode_callouts_t,
img_t,
img_decode_begin(),
img_decode_finish(),
io_open()
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_decode_frame.html on line 157
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_decode_frame.html on line 157