Blame include/share/grabbag/picture.h

Packit Service 065837
/* grabbag - Convenience lib for various routines common to several tools
Packit Service 065837
 * Copyright (C) 2006-2009  Josh Coalson
Packit Service 065837
 * Copyright (C) 2011-2016  Xiph.Org Foundation
Packit Service 065837
 *
Packit Service 065837
 * This program is free software; you can redistribute it and/or
Packit Service 065837
 * modify it under the terms of the GNU General Public License
Packit Service 065837
 * as published by the Free Software Foundation; either version 2
Packit Service 065837
 * of the License, or (at your option) any later version.
Packit Service 065837
 *
Packit Service 065837
 * This program is distributed in the hope that it will be useful,
Packit Service 065837
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 065837
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service 065837
 * GNU General Public License for more details.
Packit Service 065837
 *
Packit Service 065837
 * You should have received a copy of the GNU General Public License along
Packit Service 065837
 * with this program; if not, write to the Free Software Foundation, Inc.,
Packit Service 065837
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Packit Service 065837
 */
Packit Service 065837
Packit Service 065837
/* This .h cannot be included by itself; #include "share/grabbag.h" instead. */
Packit Service 065837
Packit Service 065837
#ifndef GRABBAG__PICTURE_H
Packit Service 065837
#define GRABBAG__PICTURE_H
Packit Service 065837
Packit Service 065837
#include "FLAC/metadata.h"
Packit Service 065837
Packit Service 065837
#ifdef __cplusplus
Packit Service 065837
extern "C" {
Packit Service 065837
#endif
Packit Service 065837
Packit Service 065837
/* spec should be of the form "[TYPE]|MIME_TYPE|[DESCRIPTION]|[WIDTHxHEIGHTxDEPTH[/COLORS]]|FILE", e.g.
Packit Service 065837
 *   "|image/jpeg|||cover.jpg"
Packit Service 065837
 *   "4|image/jpeg||300x300x24|backcover.jpg"
Packit Service 065837
 *   "|image/png|description|300x300x24/71|cover.png"
Packit Service 065837
 *   "-->|image/gif||300x300x24/71|http://blah.blah.blah/cover.gif"
Packit Service 065837
 *
Packit Service 065837
 * empty type means default to FLAC__STREAM_METADATA_PICTURE_TYPE_FRONT_COVER
Packit Service 065837
 * empty resolution spec means to get from the file (cannot get used with "-->" linked images)
Packit Service 065837
 * spec and error_message must not be NULL
Packit Service 065837
 */
Packit Service 065837
FLAC__StreamMetadata *grabbag__picture_parse_specification(const char *spec, const char **error_message);
Packit Service 065837
Packit Service 065837
typedef struct PictureResolution
Packit Service 065837
{	uint32_t width, height, depth, colors ;
Packit Service 065837
} PictureResolution ;
Packit Service 065837
Packit Service 065837
FLAC__StreamMetadata *grabbag__picture_from_specification(int type, const char *mime_type, const char * description,
Packit Service 065837
		const PictureResolution * res, const char * filepath, const char **error_message);
Packit Service 065837
Packit Service 065837
#ifdef __cplusplus
Packit Service 065837
}
Packit Service 065837
#endif
Packit Service 065837
Packit Service 065837
#endif