Blender V5.0
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#include "BLI_string_ref.hh"
12
13/* API for reading and writing multi-layer EXR files. */
14
15/* XXX layer+pass name max 64? */
16#define EXR_LAY_MAXNAME 64
17#define EXR_PASS_MAXNAME 64
18#define EXR_VIEW_MAXNAME 64
19#define EXR_TOT_MAXNAME 64
21#define EXR_PASS_MAXCHAN 24
22
23struct StampData;
24struct ExrHandle;
25
27
35 blender::StringRefNull layerpassname,
36 blender::StringRefNull channelnames,
38 blender::StringRefNull colorspace,
39 size_t xstride,
40 size_t ystride,
41 float *rect,
42 bool use_half_float);
43
48 ExrHandle *handle, const char *filepath, int *width, int *height, bool parse_channels);
53 const char *filepath,
54 int width,
55 int height,
56 const double ppm[2],
57 int compress,
58 int quality,
59 const StampData *stamp);
60
66 ExrHandle *handle, blender::StringRefNull full_name, int xstride, int ystride, float *rect);
67
70
72 void *base,
73 void *(*addview)(void *base, const char *str),
74 void *(*addlayer)(void *base, const char *str),
75 void (*addpass)(void *base,
76 void *lay,
77 const char *str,
78 float *rect,
79 int totchan,
80 const char *chan_id,
81 const char *view));
82
83void IMB_exr_close(ExrHandle *handle);
84
85void IMB_exr_add_view(ExrHandle *handle, const char *name);
86
88
89bool IMB_exr_get_ppm(ExrHandle *handle, double ppm[2]);
static AppView * view
void IMB_exr_add_channels(ExrHandle *handle, blender::StringRefNull layerpassname, blender::StringRefNull channelnames, blender::StringRefNull viewname, blender::StringRefNull colorspace, size_t xstride, size_t ystride, float *rect, bool use_half_float)
bool IMB_exr_begin_write(ExrHandle *handle, const char *filepath, int width, int height, const double ppm[2], int compress, int quality, const StampData *stamp)
ExrHandle * IMB_exr_get_handle(bool write_multipart=false)
void IMB_exr_close(ExrHandle *handle)
void IMB_exr_write_channels(ExrHandle *handle)
bool IMB_exr_has_multilayer(ExrHandle *handle)
void IMB_exr_multilayer_convert(ExrHandle *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))
bool IMB_exr_get_ppm(ExrHandle *handle, double ppm[2])
void IMB_exr_read_channels(ExrHandle *handle)
bool IMB_exr_set_channel(ExrHandle *handle, blender::StringRefNull full_name, int xstride, int ystride, float *rect)
bool IMB_exr_begin_read(ExrHandle *handle, const char *filepath, int *width, int *height, bool parse_channels)
void IMB_exr_add_view(ExrHandle *handle, const char *name)
#define str(s)
static bool parse_channels(const ImageSpec &in_spec, vector< MergeImageLayer > &layers, string &error)
Definition merge.cpp:133
const char * name
bool write_multipart