Blender V4.5
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
8
9#pragma once
10
11/* API for reading and writing multi-layer 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 const double ppm[2],
53 int compress,
54 int quality,
55 const StampData *stamp);
56
62bool IMB_exr_set_channel(void *handle,
63 const char *layname,
64 const char *passname,
65 int xstride,
66 int ystride,
67 float *rect);
68
69void IMB_exr_read_channels(void *handle);
70void IMB_exr_write_channels(void *handle);
71
72void IMB_exr_multilayer_convert(void *handle,
73 void *base,
74 void *(*addview)(void *base, const char *str),
75 void *(*addlayer)(void *base, const char *str),
76 void (*addpass)(void *base,
77 void *lay,
78 const char *str,
79 float *rect,
80 int totchan,
81 const char *chan_id,
82 const char *view));
83
84void IMB_exr_close(void *handle);
85
86void IMB_exr_add_view(void *handle, const char *name);
87
88bool IMB_exr_has_multilayer(void *handle);
89
90bool IMB_exr_get_ppm(void *handle, double ppm[2]);
static AppView * view
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)
bool IMB_exr_begin_write(void *handle, const char *filepath, int width, int height, const double ppm[2], int compress, int quality, const StampData *stamp)
void IMB_exr_close(void *handle)
bool IMB_exr_begin_read(void *handle, const char *filepath, int *width, int *height, bool parse_channels)
bool IMB_exr_get_ppm(void *handle, double ppm[2])
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)
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:133