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