Cleanup: use doxy sections for object_dupli.c
[blender.git] / source / blender / imbuf / intern / openexr / openexr_multi.h
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2006 Blender Foundation
17  * All rights reserved.
18  */
19
20 /** \file
21  * \ingroup openexr
22  */
23
24 #pragma once
25
26 /* experiment with more advanced exr api */
27
28 /* XXX layer+pass name max 64? */
29 /* This api also supports max 8 channels per pass now. easy to fix! */
30 #define EXR_LAY_MAXNAME 64
31 #define EXR_PASS_MAXNAME 64
32 #define EXR_VIEW_MAXNAME 64
33 #define EXR_TOT_MAXNAME 64
34 #define EXR_PASS_MAXCHAN 24
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 struct StampData;
41
42 void *IMB_exr_get_handle(void);
43 void *IMB_exr_get_handle_name(const char *name);
44 void IMB_exr_add_channel(void *handle,
45                          const char *layname,
46                          const char *passname,
47                          const char *view,
48                          int xstride,
49                          int ystride,
50                          float *rect,
51                          bool use_half_float);
52
53 int IMB_exr_begin_read(void *handle, const char *filename, int *width, int *height);
54 int IMB_exr_begin_write(void *handle,
55                         const char *filename,
56                         int width,
57                         int height,
58                         int compress,
59                         const struct StampData *stamp);
60 void IMB_exrtile_begin_write(
61     void *handle, const char *filename, int mipmap, int width, int height, int tilex, int tiley);
62
63 void IMB_exr_set_channel(void *handle,
64                          const char *layname,
65                          const char *passname,
66                          int xstride,
67                          int ystride,
68                          float *rect);
69 float *IMB_exr_channel_rect(void *handle,
70                             const char *layname,
71                             const char *passname,
72                             const char *view);
73
74 void IMB_exr_read_channels(void *handle);
75 void IMB_exr_write_channels(void *handle);
76 void IMB_exrtile_write_channels(
77     void *handle, int partx, int party, int level, const char *viewname, bool empty);
78 void IMB_exr_clear_channels(void *handle);
79
80 void IMB_exr_multilayer_convert(void *handle,
81                                 void *base,
82                                 void *(*addview)(void *base, const char *str),
83                                 void *(*addlayer)(void *base, const char *str),
84                                 void (*addpass)(void *base,
85                                                 void *lay,
86                                                 const char *str,
87                                                 float *rect,
88                                                 int totchan,
89                                                 const char *chan_id,
90                                                 const char *view));
91
92 void IMB_exr_close(void *handle);
93
94 void IMB_exr_add_view(void *handle, const char *name);
95
96 bool IMB_exr_has_multilayer(void *handle);
97
98 #ifdef __cplusplus
99 }  // extern "C"
100 #endif