.\" Automatically generated by Pandoc 3.1.3 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .TH "al_register_bitmap_identifier" "3alleg5" "" "Allegro reference manual" "" .hy .SH NAME .PP al_register_bitmap_identifier - Allegro 5 API .SH SYNOPSIS .IP .nf \f[C] #include bool al_register_bitmap_identifier(const char *extension, bool (*identifier)(ALLEGRO_FILE *f)) \f[R] .fi .SH DESCRIPTION .PP Register an identify handler for al_identify_bitmap(3alleg5). The given function will be used to detect files for the given extension. It will be called with a single argument of type ALLEGRO_FILE(3alleg5) which is a file handle opened for reading and located at the first byte of the file. The handler should try to read as few bytes as possible to safely determine if the given file contents correspond to the type with the extension and return true in that case, false otherwise. The file handle must not be closed but there is no need to reset it to the beginning. .PP The extension should include the leading dot (`.') character. It will be matched case-insensitively. .PP The \f[V]identifier\f[R] argument may be NULL to unregister an entry. .PP Returns true on success, false on error. Returns false if unregistering an entry that doesn\[cq]t exist. .SH SINCE .PP 5.1.12 .SH SEE ALSO .PP al_identify_bitmap(3alleg5)