~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to source/blender/imbuf/intern/IMB_imginfo.h

  • Committer: Bazaar Package Importer
  • Author(s): Kevin Roy
  • Date: 2011-02-08 22:20:54 UTC
  • mfrom: (1.4.2 upstream)
  • mto: (14.2.6 sid) (1.5.1)
  • mto: This revision was merged to the branch mainline in revision 27.
  • Revision ID: james.westby@ubuntu.com-20110208222054-kk0gwa4bu8h5lyq4
Tags: upstream-2.56.1-beta-svn34076
ImportĀ upstreamĀ versionĀ 2.56.1-beta-svn34076

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**
2
 
 * $Id: IMB_imginfo.h 12931 2007-12-17 18:20:48Z theeth $ 
3
 
 *
4
 
 * ***** BEGIN GPL LICENSE BLOCK *****
5
 
 *
6
 
 * This program is free software; you can redistribute it and/or
7
 
 * modify it under the terms of the GNU General Public License
8
 
 * as published by the Free Software Foundation; either version 2
9
 
 * of the License, or (at your option) any later version. 
10
 
 *
11
 
 * This program is distributed in the hope that it will be useful,
12
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
 * GNU General Public License for more details.
15
 
 *
16
 
 * You should have received a copy of the GNU General Public License
17
 
 * along with this program; if not, write to the Free Software Foundation,
18
 
 * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19
 
 *
20
 
 * The Original Code is Copyright (C) 2005 Blender Foundation
21
 
 * All rights reserved.
22
 
 *
23
 
 * The Original Code is: all of this file.
24
 
 *
25
 
 * Contributor(s): Austin Benesh. Ton Roosendaal.
26
 
 *
27
 
 * ***** END GPL LICENSE BLOCK *****
28
 
 */
29
 
 
30
 
#ifndef _IMB_IMGINFO_H
31
 
#define _IMB_IMGINFO_H
32
 
 
33
 
#ifdef __cplusplus
34
 
extern "C" {
35
 
#endif
36
 
 
37
 
struct ImBuf;
38
 
 
39
 
typedef struct ImgInfo {
40
 
        struct ImgInfo *next, *prev;
41
 
        char* key;
42
 
        char* value;
43
 
        int len;
44
 
} ImgInfo;
45
 
 
46
 
/** The imginfo is a list of key/value pairs (both char*) that can me 
47
 
    saved in the header of several image formats.
48
 
        Apart from some common keys like 
49
 
        'Software' and 'Description' (png standard) we'll use keys within the 
50
 
        Blender namespace, so should be called 'Blender::StampInfo' or 'Blender::FrameNum'
51
 
        etc... 
52
 
*/
53
 
 
54
 
 
55
 
/* free blender ImgInfo struct */
56
 
void IMB_imginfo_free(struct ImBuf* img);
57
 
 
58
 
/** read the field from the image info into the field 
59
 
 *  @param img - the ImBuf that contains the image data
60
 
 *  @param key - the key of the field
61
 
 *  @param value - the data in the field, first one found with key is returned, 
62
 
                  memory has to be allocated by user.
63
 
 *  @param len - length of value buffer allocated by user.
64
 
 *  @return    - 1 (true) if ImageInfo present and value for the key found, 0 (false) otherwise
65
 
 */
66
 
int IMB_imginfo_get_field(struct ImBuf* img, const char* key, char* value, int len);
67
 
 
68
 
/** set user data in the ImgInfo struct, which has to be allocated with IMB_imginfo_create
69
 
 *  before calling this function.
70
 
 *  @param img - the ImBuf that contains the image data
71
 
 *  @param key - the key of the field
72
 
 *  @param value - the data to be written to the field. zero terminated string
73
 
 *  @return    - 1 (true) if ImageInfo present, 0 (false) otherwise
74
 
 */
75
 
int IMB_imginfo_add_field(struct ImBuf* img, const char* key, const char* field);
76
 
 
77
 
/** delete the key/field par in the ImgInfo struct.
78
 
 * @param img - the ImBuf that contains the image data
79
 
 * @param key - the key of the field
80
 
 * @return - 1 (true) if delete the key/field, 0 (false) otherwise
81
 
 */
82
 
int IMB_imginfo_del_field(struct ImBuf *img, const char *key);
83
 
 
84
 
#endif /* _IMB_IMGINFO_H */
85