4 * ***** BEGIN GPL LICENSE BLOCK *****
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.
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.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 * The Original Code is Copyright (C) 2006 Blender Foundation
21 * All rights reserved.
23 * The Original Code is: all of this file.
25 * Contributor(s): Ton Roosendaal.
27 * ***** END GPL LICENSE BLOCK *****
30 /** \file blender/imbuf/intern/openexr/openexr_multi.h
35 #ifndef _OPENEXR_MULTI_H
36 #define _OPENEXR_MULTI_H
38 /* experiment with more advanced exr api */
40 /* Note: as for now openexr only supports 32 chars in channel names.
41 This api also supports max 8 channels per pass now. easy to fix! */
42 #define EXR_LAY_MAXNAME 19
43 #define EXR_PASS_MAXNAME 11
44 #define EXR_TOT_MAXNAME 32
45 #define EXR_PASS_MAXCHAN 8
49 void * IMB_exr_get_handle (void);
50 void IMB_exr_add_channel (void *handle, const char *layname, const char *passname, int xstride, int ystride, float *rect);
52 int IMB_exr_begin_read (void *handle, const char *filename, int *width, int *height);
53 int IMB_exr_begin_write (void *handle, const char *filename, int width, int height, int compress);
54 void IMB_exrtile_begin_write (void *handle, const char *filename, int mipmap, int width, int height, int tilex, int tiley);
56 void IMB_exr_set_channel (void *handle, const char *layname, const char *passname, int xstride, int ystride, float *rect);
58 void IMB_exr_read_channels (void *handle);
59 void IMB_exr_write_channels (void *handle);
60 void IMB_exrtile_write_channels (void *handle, int partx, int party, int level);
61 void IMB_exrtile_clear_channels (void *handle);
63 void IMB_exr_multilayer_convert (void *handle, void *base,
64 void * (*addlayer)(void *base, char *str),
65 void (*addpass)(void *base, void *lay, char *str, float *rect, int totchan, char *chan_id));
67 void IMB_exr_close (void *handle);
72 /* ugly... but we only use it on pipeline.c, render module, now */
74 void * IMB_exr_get_handle (void) {return NULL;}
75 void IMB_exr_add_channel (void *handle, const char *layname, const char *channame, int xstride, int ystride, float *rect) { (void)handle; (void)layname; (void)channame; (void)xstride; (void)ystride; (void)rect; }
77 int IMB_exr_begin_read (void *handle, const char *filename, int *width, int *height) { (void)handle; (void)filename; (void)width; (void)height; return 0;}
78 int IMB_exr_begin_write (void *handle, const char *filename, int width, int height, int compress) { (void)handle; (void)filename; (void)width; (void)height; (void)compress; return 0;}
79 void IMB_exrtile_begin_write (void *handle, const char *filename, int mipmap, int width, int height, int tilex, int tiley) { (void)handle; (void)filename; (void)mipmap; (void)width; (void)height; (void)tilex; (void)tiley; }
81 void IMB_exr_set_channel (void *handle, char *layname, const char *channame, int xstride, int ystride, float *rect) { (void)handle; (void)layname; (void)channame; (void)xstride; (void)ystride; (void)rect; }
83 void IMB_exr_read_channels (void *handle) { (void)handle; }
84 void IMB_exr_write_channels (void *handle) { (void)handle; }
85 void IMB_exrtile_write_channels (void *handle, int partx, int party, int level) { (void)handle; (void)partx; (void)party; (void)level; }
86 void IMB_exrtile_clear_channels (void *handle) { (void)handle; }
88 void IMB_exr_multilayer_convert (void *handle, void *base,
89 void * (*addlayer)(void *base, char *str),
90 void (*addpass)(void *base, void *lay, char *str, float *rect, int totchan, char *chan_id))
92 (void)handle; (void)base; (void)addlayer; (void)addpass;
95 void IMB_exr_close (void *handle) { (void)handle; }
101 #endif /* __OPENEXR_MULTI_H */