[][src]Function flac_sys::FLAC__metadata_get_picture

pub unsafe extern "C" fn FLAC__metadata_get_picture(
    filename: *const c_char,
    picture: *mut *mut FLAC__StreamMetadata,
    type_: FLAC__StreamMetadata_Picture_Type,
    mime_type: *const c_char,
    description: *const FLAC__byte,
    max_width: c_uint,
    max_height: c_uint,
    max_depth: c_uint,
    max_colors: c_uint
) -> FLAC__bool

Read a PICTURE metadata block of the given FLAC file. This function will try to skip any ID3v2 tag at the head of the file. Since there can be more than one PICTURE block in a file, this function takes a number of parameters that act as constraints to the search. The PICTURE block with the largest area matching all the constraints will be returned, or \a *picture will be set to \c NULL if there was no such block.

\param filename The path to the FLAC file to read. \param picture The address where the returned pointer will be stored. The \a picture object must be deleted by the caller using FLAC__metadata_object_delete(). \param type The desired picture type. Use \c -1 to mean "any type". \param mime_type The desired MIME type, e.g. "image/jpeg". The string will be matched exactly. Use \c NULL to mean "any MIME type". \param description The desired description. The string will be matched exactly. Use \c NULL to mean "any description". \param max_width The maximum width in pixels desired. Use \c (unsigned)(-1) to mean "any width". \param max_height The maximum height in pixels desired. Use \c (unsigned)(-1) to mean "any height". \param max_depth The maximum color depth in bits-per-pixel desired. Use \c (unsigned)(-1) to mean "any depth". \param max_colors The maximum number of colors desired. Use \c (unsigned)(-1) to mean "any number of colors". \assert \code filename != NULL \endcode \code picture != NULL \endcode \retval FLAC__bool \c true if a valid PICTURE block was read from \a filename, and \a *picture will be set to the address of the metadata structure. Returns \c false if there was a memory allocation error, a file decoder error, or the file contained no PICTURE block, and \a *picture will be set to \c NULL.