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_validate.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_validate.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_validate.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_validate.html on line 8

img_decode_validate()

Find a codec for decoding

Synopsis:

#include <img.h>

int img_decode_validate(
        const img_codec_t*  codecs,
        size_t              ncodecs,
        io_stream_t*        input,
        unsigned*           codec );

Arguments:

codecs
A pointer to an array of img_codec_t handles providing a list of codecs to try. The function will try each codec in order until it finds one that validates the data in the stream.
ncodecs
The number of items in the codecs array.
input
The input source.
codec
The address of an unsigned value where the function stores the index of the codec that validated the datastream. This memory is left untouched if no such codec is found.

Library:

img

Description:

This function finds a suitable codec for decoding.

Returns:

Status of the operation:

IMG_ERR_OK
Success; an appropriate codec was found. Check codec for the index of the codec in the codecs array which validated the datastream.
IMG_ERR_DLL
An error occurred processing the DLL that handles the file type. Check to make sure that the DLL is not missing or corrupt.
IMG_ERR_FORMAT
No installed codec recognized the input data as a format it supports. This could mean the data is of a format that's not supported, or the datastream is corrupt.
IMG_ERR_NOTIMPL
The codec that recognized the input data as the format it supports doesn't have a validate method.

Classification:

Image library

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

img_decode_callouts_t, img_t, 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_validate.html on line 142

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_validate.html on line 142