Blender V4.3
IMB_openexr.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11/* API for reading and writing multilayer EXR files. */
12
13/* XXX layer+pass name max 64? */
14/* This api also supports max 8 channels per pass now. easy to fix! */
15#define EXR_LAY_MAXNAME 64
16#define EXR_PASS_MAXNAME 64
17#define EXR_VIEW_MAXNAME 64
18#define EXR_TOT_MAXNAME 64
19#define EXR_PASS_MAXCHAN 24
20
21struct StampData;
22
23void *IMB_exr_get_handle();
24void *IMB_exr_get_handle_name(const char *name);
25
31void IMB_exr_add_channel(void *handle,
32 const char *layname,
33 const char *passname,
34 const char *viewname,
35 int xstride,
36 int ystride,
37 float *rect,
38 bool use_half_float);
39
44 void *handle, const char *filepath, int *width, int *height, bool parse_channels);
48bool IMB_exr_begin_write(void *handle,
49 const char *filepath,
50 int width,
51 int height,
52 int compress,
53 const StampData *stamp);
59 void *handle, const char *filepath, int mipmap, int width, int height, int tilex, int tiley);
60
66bool IMB_exr_set_channel(void *handle,
67 const char *layname,
68 const char *passname,
69 int xstride,
70 int ystride,
71 float *rect);
72float *IMB_exr_channel_rect(void *handle,
73 const char *layname,
74 const char *passname,
75 const char *viewname);
76
77void IMB_exr_read_channels(void *handle);
78void IMB_exr_write_channels(void *handle);
84 void *handle, int partx, int party, int level, const char *viewname, bool empty);
85void IMB_exr_clear_channels(void *handle);
86
87void IMB_exr_multilayer_convert(void *handle,
88 void *base,
89 void *(*addview)(void *base, const char *str),
90 void *(*addlayer)(void *base, const char *str),
91 void (*addpass)(void *base,
92 void *lay,
93 const char *str,
94 float *rect,
95 int totchan,
96 const char *chan_id,
97 const char *view));
98
99void IMB_exr_close(void *handle);
100
101void IMB_exr_add_view(void *handle, const char *name);
102
103bool IMB_exr_has_multilayer(void *handle);
bool IMB_exr_begin_write(void *handle, const char *filepath, int width, int height, int compress, const StampData *stamp)
void IMB_exr_add_view(void *handle, const char *name)
bool IMB_exr_has_multilayer(void *handle)
void * IMB_exr_get_handle_name(const char *name)
void IMB_exr_close(void *handle)
void IMB_exrtile_begin_write(void *handle, const char *filepath, int mipmap, int width, int height, int tilex, int tiley)
bool IMB_exr_begin_read(void *handle, const char *filepath, int *width, int *height, bool parse_channels)
void IMB_exr_clear_channels(void *handle)
float * IMB_exr_channel_rect(void *handle, const char *layname, const char *passname, const char *viewname)
void IMB_exr_add_channel(void *handle, const char *layname, const char *passname, const char *viewname, int xstride, int ystride, float *rect, bool use_half_float)
void IMB_exr_write_channels(void *handle)
void IMB_exr_read_channels(void *handle)
void IMB_exrtile_write_channels(void *handle, int partx, int party, int level, const char *viewname, bool empty)
bool IMB_exr_set_channel(void *handle, const char *layname, const char *passname, int xstride, int ystride, float *rect)
void IMB_exr_multilayer_convert(void *handle, void *base, void *(*addview)(void *base, const char *str), void *(*addlayer)(void *base, const char *str), void(*addpass)(void *base, void *lay, const char *str, float *rect, int totchan, const char *chan_id, const char *view))
void * IMB_exr_get_handle()
#define str(s)
static bool parse_channels(const ImageSpec &in_spec, vector< MergeImageLayer > &layers, string &error)
Definition merge.cpp:137