Blender  V2.93
image_save.c
Go to the documentation of this file.
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) 2001-2002 by NaN Holding BV.
17  * All rights reserved.
18  */
19 
24 #include <errno.h>
25 #include <string.h>
26 
27 #include "BLI_listbase.h"
28 #include "BLI_path_util.h"
29 #include "BLI_string.h"
30 
31 #include "DNA_image_types.h"
32 
33 #include "IMB_colormanagement.h"
34 #include "IMB_imbuf.h"
35 #include "IMB_imbuf_types.h"
36 
37 #include "BKE_colortools.h"
38 #include "BKE_image.h"
39 #include "BKE_image_save.h"
40 #include "BKE_main.h"
41 #include "BKE_report.h"
42 #include "BKE_scene.h"
43 
44 #include "RE_pipeline.h"
45 
47 {
48  memset(opts, 0, sizeof(*opts));
49 
50  opts->bmain = bmain;
51  opts->scene = scene;
52 
54 }
55 
56 static void image_save_post(ReportList *reports,
57  Image *ima,
58  ImBuf *ibuf,
59  int ok,
60  ImageSaveOptions *opts,
61  int save_copy,
62  const char *filepath,
63  bool *r_colorspace_changed)
64 {
65  if (!ok) {
66  BKE_reportf(reports, RPT_ERROR, "Could not write image: %s", strerror(errno));
67  return;
68  }
69 
70  if (save_copy) {
71  return;
72  }
73 
74  if (opts->do_newpath) {
75  BLI_strncpy(ibuf->name, filepath, sizeof(ibuf->name));
76  BLI_strncpy(ima->filepath, filepath, sizeof(ima->filepath));
77  }
78 
79  ibuf->userflags &= ~IB_BITMAPDIRTY;
80 
81  /* change type? */
82  if (ima->type == IMA_TYPE_R_RESULT) {
83  ima->type = IMA_TYPE_IMAGE;
84 
85  /* workaround to ensure the render result buffer is no longer used
86  * by this image, otherwise can crash when a new render result is
87  * created. */
88  if (ibuf->rect && !(ibuf->mall & IB_rect)) {
89  imb_freerectImBuf(ibuf);
90  }
91  if (ibuf->rect_float && !(ibuf->mall & IB_rectfloat)) {
93  }
94  if (ibuf->zbuf && !(ibuf->mall & IB_zbuf)) {
95  IMB_freezbufImBuf(ibuf);
96  }
97  if (ibuf->zbuf_float && !(ibuf->mall & IB_zbuffloat)) {
99  }
100  }
102  ima->source = IMA_SRC_FILE;
103  ima->type = IMA_TYPE_IMAGE;
104  }
105 
106  /* only image path, never ibuf */
107  if (opts->relative) {
108  const char *relbase = ID_BLEND_PATH(opts->bmain, &ima->id);
109  BLI_path_rel(ima->filepath, relbase); /* only after saving */
110  }
111 
112  ColorManagedColorspaceSettings old_colorspace_settings;
113  BKE_color_managed_colorspace_settings_copy(&old_colorspace_settings, &ima->colorspace_settings);
115  if (!BKE_color_managed_colorspace_settings_equals(&old_colorspace_settings,
116  &ima->colorspace_settings)) {
117  *r_colorspace_changed = true;
118  }
119 }
120 
121 static void imbuf_save_post(ImBuf *ibuf, ImBuf *colormanaged_ibuf)
122 {
123  if (colormanaged_ibuf != ibuf) {
124  /* This guys might be modified by image buffer write functions,
125  * need to copy them back from color managed image buffer to an
126  * original one, so file type of image is being properly updated.
127  */
128  ibuf->ftype = colormanaged_ibuf->ftype;
129  ibuf->foptions = colormanaged_ibuf->foptions;
130  ibuf->planes = colormanaged_ibuf->planes;
131 
132  IMB_freeImBuf(colormanaged_ibuf);
133  }
134 }
135 
141 static bool image_save_single(ReportList *reports,
142  Image *ima,
143  ImageUser *iuser,
144  ImageSaveOptions *opts,
145  bool *r_colorspace_changed)
146 {
147  void *lock;
148  ImBuf *ibuf = BKE_image_acquire_ibuf(ima, iuser, &lock);
149  RenderResult *rr = NULL;
150  bool ok = false;
151 
152  if (ibuf == NULL || (ibuf->rect == NULL && ibuf->rect_float == NULL)) {
153  BKE_image_release_ibuf(ima, ibuf, lock);
154  goto cleanup;
155  }
156 
157  ImBuf *colormanaged_ibuf = NULL;
158  const bool save_copy = opts->save_copy;
159  const bool save_as_render = opts->save_as_render;
160  ImageFormatData *imf = &opts->im_format;
161 
162  if (ima->type == IMA_TYPE_R_RESULT) {
163  /* enforce user setting for RGB or RGBA, but skip BW */
164  if (opts->im_format.planes == R_IMF_PLANES_RGBA) {
165  ibuf->planes = R_IMF_PLANES_RGBA;
166  }
167  else if (opts->im_format.planes == R_IMF_PLANES_RGB) {
168  ibuf->planes = R_IMF_PLANES_RGB;
169  }
170  }
171  else {
172  /* TODO, better solution, if a 24bit image is painted onto it may contain alpha */
173  if ((opts->im_format.planes == R_IMF_PLANES_RGBA) &&
174  /* it has been painted onto */
175  (ibuf->userflags & IB_BITMAPDIRTY)) {
176  /* checks each pixel, not ideal */
178  }
179  }
180 
181  /* we need renderresult for exr and rendered multiview */
182  rr = BKE_image_acquire_renderresult(opts->scene, ima);
183  bool is_mono = rr ? BLI_listbase_count_at_most(&rr->views, 2) < 2 :
184  BLI_listbase_count_at_most(&ima->views, 2) < 2;
185  bool is_exr_rr = rr && ELEM(imf->imtype, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_MULTILAYER) &&
186  RE_HasFloatPixels(rr);
187  bool is_multilayer = is_exr_rr && (imf->imtype == R_IMF_IMTYPE_MULTILAYER);
188  int layer = (iuser && !is_multilayer) ? iuser->layer : -1;
189 
190  /* error handling */
191  if (!rr) {
192  if (imf->imtype == R_IMF_IMTYPE_MULTILAYER) {
193  BKE_report(reports, RPT_ERROR, "Did not write, no Multilayer Image");
194  BKE_image_release_ibuf(ima, ibuf, lock);
195  goto cleanup;
196  }
197  }
198  else {
199  if (imf->views_format == R_IMF_VIEWS_STEREO_3D) {
200  if (!BKE_image_is_stereo(ima)) {
201  BKE_reportf(reports,
202  RPT_ERROR,
203  "Did not write, the image doesn't have a \"%s\" and \"%s\" views",
206  BKE_image_release_ibuf(ima, ibuf, lock);
207  goto cleanup;
208  }
209 
210  /* it shouldn't ever happen*/
211  if ((BLI_findstring(&rr->views, STEREO_LEFT_NAME, offsetof(RenderView, name)) == NULL) ||
212  (BLI_findstring(&rr->views, STEREO_RIGHT_NAME, offsetof(RenderView, name)) == NULL)) {
213  BKE_reportf(reports,
214  RPT_ERROR,
215  "Did not write, the image doesn't have a \"%s\" and \"%s\" views",
218  BKE_image_release_ibuf(ima, ibuf, lock);
219  goto cleanup;
220  }
221  }
222  BKE_imbuf_stamp_info(rr, ibuf);
223  }
224 
225  /* fancy multiview OpenEXR */
226  if (imf->views_format == R_IMF_VIEWS_MULTIVIEW && is_exr_rr) {
227  /* save render result */
228  ok = RE_WriteRenderResult(reports, rr, opts->filepath, imf, NULL, layer);
229  image_save_post(reports, ima, ibuf, ok, opts, true, opts->filepath, r_colorspace_changed);
230  BKE_image_release_ibuf(ima, ibuf, lock);
231  }
232  /* regular mono pipeline */
233  else if (is_mono) {
234  if (is_exr_rr) {
235  ok = RE_WriteRenderResult(reports, rr, opts->filepath, imf, NULL, layer);
236  }
237  else {
238  colormanaged_ibuf = IMB_colormanagement_imbuf_for_write(
239  ibuf, save_as_render, true, &imf->view_settings, &imf->display_settings, imf);
240  ok = BKE_imbuf_write_as(colormanaged_ibuf, opts->filepath, imf, save_copy);
241  imbuf_save_post(ibuf, colormanaged_ibuf);
242  }
243  image_save_post(reports,
244  ima,
245  ibuf,
246  ok,
247  opts,
248  (is_exr_rr ? true : save_copy),
249  opts->filepath,
250  r_colorspace_changed);
251  BKE_image_release_ibuf(ima, ibuf, lock);
252  }
253  /* individual multiview images */
254  else if (imf->views_format == R_IMF_VIEWS_INDIVIDUAL) {
255  unsigned char planes = ibuf->planes;
256  const int totviews = (rr ? BLI_listbase_count(&rr->views) : BLI_listbase_count(&ima->views));
257 
258  if (!is_exr_rr) {
259  BKE_image_release_ibuf(ima, ibuf, lock);
260  }
261 
262  for (int i = 0; i < totviews; i++) {
263  char filepath[FILE_MAX];
264  bool ok_view = false;
265  const char *view = rr ? ((RenderView *)BLI_findlink(&rr->views, i))->name :
266  ((ImageView *)BLI_findlink(&ima->views, i))->name;
267 
268  if (is_exr_rr) {
269  BKE_scene_multiview_view_filepath_get(&opts->scene->r, opts->filepath, view, filepath);
270  ok_view = RE_WriteRenderResult(reports, rr, filepath, imf, view, layer);
271  image_save_post(reports, ima, ibuf, ok_view, opts, true, filepath, r_colorspace_changed);
272  }
273  else {
274  /* copy iuser to get the correct ibuf for this view */
275  ImageUser view_iuser;
276 
277  if (iuser) {
278  /* copy iuser to get the correct ibuf for this view */
279  view_iuser = *iuser;
280  }
281  else {
282  BKE_imageuser_default(&view_iuser);
283  }
284 
285  view_iuser.view = i;
286  view_iuser.flag &= ~IMA_SHOW_STEREO;
287 
288  if (rr) {
289  BKE_image_multilayer_index(rr, &view_iuser);
290  }
291  else {
292  BKE_image_multiview_index(ima, &view_iuser);
293  }
294 
295  ibuf = BKE_image_acquire_ibuf(ima, &view_iuser, &lock);
296  ibuf->planes = planes;
297 
298  BKE_scene_multiview_view_filepath_get(&opts->scene->r, opts->filepath, view, filepath);
299 
300  colormanaged_ibuf = IMB_colormanagement_imbuf_for_write(
301  ibuf, save_as_render, true, &imf->view_settings, &imf->display_settings, imf);
302  ok_view = BKE_imbuf_write_as(colormanaged_ibuf, filepath, &opts->im_format, save_copy);
303  imbuf_save_post(ibuf, colormanaged_ibuf);
304  image_save_post(reports, ima, ibuf, ok_view, opts, true, filepath, r_colorspace_changed);
305  BKE_image_release_ibuf(ima, ibuf, lock);
306  }
307  ok &= ok_view;
308  }
309 
310  if (is_exr_rr) {
311  BKE_image_release_ibuf(ima, ibuf, lock);
312  }
313  }
314  /* stereo (multiview) images */
315  else if (opts->im_format.views_format == R_IMF_VIEWS_STEREO_3D) {
316  if (imf->imtype == R_IMF_IMTYPE_MULTILAYER) {
317  ok = RE_WriteRenderResult(reports, rr, opts->filepath, imf, NULL, layer);
318  image_save_post(reports, ima, ibuf, ok, opts, true, opts->filepath, r_colorspace_changed);
319  BKE_image_release_ibuf(ima, ibuf, lock);
320  }
321  else {
322  ImBuf *ibuf_stereo[2] = {NULL};
323 
324  unsigned char planes = ibuf->planes;
325  const char *names[2] = {STEREO_LEFT_NAME, STEREO_RIGHT_NAME};
326 
327  /* we need to get the specific per-view buffers */
328  BKE_image_release_ibuf(ima, ibuf, lock);
329 
330  for (int i = 0; i < 2; i++) {
331  ImageUser view_iuser;
332 
333  if (iuser) {
334  view_iuser = *iuser;
335  }
336  else {
337  BKE_imageuser_default(&view_iuser);
338  }
339 
340  view_iuser.flag &= ~IMA_SHOW_STEREO;
341 
342  if (rr) {
343  int id = BLI_findstringindex(&rr->views, names[i], offsetof(RenderView, name));
344  view_iuser.view = id;
345  BKE_image_multilayer_index(rr, &view_iuser);
346  }
347  else {
348  view_iuser.view = i;
349  BKE_image_multiview_index(ima, &view_iuser);
350  }
351 
352  ibuf = BKE_image_acquire_ibuf(ima, &view_iuser, &lock);
353 
354  if (ibuf == NULL) {
355  BKE_report(
356  reports, RPT_ERROR, "Did not write, unexpected error when saving stereo image");
357  goto cleanup;
358  }
359 
360  ibuf->planes = planes;
361 
362  /* color manage the ImBuf leaving it ready for saving */
363  colormanaged_ibuf = IMB_colormanagement_imbuf_for_write(
364  ibuf, save_as_render, true, &imf->view_settings, &imf->display_settings, imf);
365 
366  BKE_imbuf_write_prepare(colormanaged_ibuf, imf);
367  IMB_prepare_write_ImBuf(IMB_isfloat(colormanaged_ibuf), colormanaged_ibuf);
368 
369  /* duplicate buffer to prevent locker issue when using render result */
370  ibuf_stereo[i] = IMB_dupImBuf(colormanaged_ibuf);
371 
372  imbuf_save_post(ibuf, colormanaged_ibuf);
373  BKE_image_release_ibuf(ima, ibuf, lock);
374  }
375 
376  ibuf = IMB_stereo3d_ImBuf(imf, ibuf_stereo[0], ibuf_stereo[1]);
377 
378  /* save via traditional path */
379  ok = BKE_imbuf_write_as(ibuf, opts->filepath, imf, save_copy);
380 
381  IMB_freeImBuf(ibuf);
382 
383  for (int i = 0; i < 2; i++) {
384  IMB_freeImBuf(ibuf_stereo[i]);
385  }
386  }
387  }
388 
389 cleanup:
390  if (rr) {
392  }
393 
394  return ok;
395 }
396 
398  ReportList *reports, Main *bmain, Image *ima, ImageUser *iuser, ImageSaveOptions *opts)
399 {
400  ImageUser save_iuser;
401  BKE_imageuser_default(&save_iuser);
402 
403  bool colorspace_changed = false;
404 
405  if (ima->source == IMA_SRC_TILED) {
406  /* Verify filepath for tiles images. */
407  if (BLI_path_sequence_decode(opts->filepath, NULL, NULL, NULL) != 1001) {
408  BKE_reportf(reports,
409  RPT_ERROR,
410  "When saving a tiled image, the path '%s' must contain the UDIM tag 1001",
411  opts->filepath);
412  return false;
413  }
414 
415  /* For saving a tiled image we need an iuser, so use a local one if there isn't already one. */
416  if (iuser == NULL) {
417  iuser = &save_iuser;
418  }
419  }
420 
421  /* Save image - or, for tiled images, the first tile. */
422  bool ok = image_save_single(reports, ima, iuser, opts, &colorspace_changed);
423 
424  if (ok && ima->source == IMA_SRC_TILED) {
425  char filepath[FILE_MAX];
426  BLI_strncpy(filepath, opts->filepath, sizeof(filepath));
427 
428  char head[FILE_MAX], tail[FILE_MAX];
429  unsigned short numlen;
430  BLI_path_sequence_decode(filepath, head, tail, &numlen);
431 
432  /* Save all other tiles. */
433  LISTBASE_FOREACH (ImageTile *, tile, &ima->tiles) {
434  /* Tile 1001 was already saved before the loop. */
435  if (tile->tile_number == 1001 || !ok) {
436  continue;
437  }
438 
439  /* Build filepath of the tile. */
440  BLI_path_sequence_encode(opts->filepath, head, tail, numlen, tile->tile_number);
441 
442  iuser->tile = tile->tile_number;
443  ok = ok && image_save_single(reports, ima, iuser, opts, &colorspace_changed);
444  }
445  BLI_strncpy(opts->filepath, filepath, sizeof(opts->filepath));
446  }
447 
448  if (colorspace_changed) {
450  }
451 
452  return ok;
453 }
bool BKE_color_managed_colorspace_settings_equals(const struct ColorManagedColorspaceSettings *settings1, const struct ColorManagedColorspaceSettings *settings2)
void BKE_color_managed_colorspace_settings_copy(struct ColorManagedColorspaceSettings *colorspace_settings, const struct ColorManagedColorspaceSettings *settings)
void BKE_image_multiview_index(struct Image *ima, struct ImageUser *iuser)
Definition: image.c:3846
void BKE_image_release_ibuf(struct Image *ima, struct ImBuf *ibuf, void *lock)
Definition: image.c:5113
int BKE_imbuf_write_as(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf, const bool save_copy)
Definition: image.c:3015
bool BKE_image_is_stereo(struct Image *ima)
Definition: image.c:3889
struct RenderResult * BKE_image_acquire_renderresult(struct Scene *scene, struct Image *ima)
Definition: image.c:3925
void BKE_imformat_defaults(struct ImageFormatData *im_format)
Definition: image.c:1785
bool BKE_imbuf_alpha_test(struct ImBuf *ibuf)
Definition: image.c:2812
struct ImBuf * BKE_image_acquire_ibuf(struct Image *ima, struct ImageUser *iuser, void **r_lock)
Definition: image.c:5100
void BKE_imbuf_stamp_info(struct RenderResult *rr, struct ImBuf *ibuf)
Definition: image.c:2784
void BKE_imbuf_write_prepare(struct ImBuf *ibuf, const struct ImageFormatData *imf)
struct RenderPass * BKE_image_multilayer_index(struct RenderResult *rr, struct ImageUser *iuser)
Definition: image.c:3813
#define IMA_SIGNAL_COLORMANAGE
Definition: BKE_image.h:168
void BKE_image_signal(struct Main *bmain, struct Image *ima, struct ImageUser *iuser, int signal)
Definition: image.c:3499
void BKE_image_release_renderresult(struct Scene *scene, struct Image *ima)
Definition: image.c:3947
void BKE_imageuser_default(struct ImageUser *iuser)
Definition: image.c:3451
void BKE_report(ReportList *reports, ReportType type, const char *message)
Definition: report.c:104
void BKE_reportf(ReportList *reports, ReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_scene_multiview_view_filepath_get(const struct RenderData *rd, const char *filepath, const char *view, char *r_filepath)
#define LISTBASE_FOREACH(type, var, list)
Definition: BLI_listbase.h:172
int BLI_listbase_count_at_most(const struct ListBase *listbase, const int count_max) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findstring(const struct ListBase *listbase, const char *id, const int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_findstringindex(const struct ListBase *listbase, const char *id, const int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define FILE_MAX
int BLI_path_sequence_decode(const char *string, char *head, char *tail, unsigned short *r_num_len)
Definition: path_util.c:83
void BLI_path_sequence_encode(char *string, const char *head, const char *tail, unsigned short numlen, int pic)
Definition: path_util.c:154
void BLI_path_rel(char *file, const char *relfile) ATTR_NONNULL()
Definition: path_util.c:519
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
Definition: string.c:108
#define ELEM(...)
#define ID_BLEND_PATH(_bmain, _id)
Definition: DNA_ID.h:419
@ IMA_TYPE_R_RESULT
@ IMA_TYPE_IMAGE
@ IMA_SRC_FILE
@ IMA_SRC_GENERATED
@ IMA_SRC_VIEWER
@ IMA_SRC_TILED
#define IMA_SHOW_STEREO
#define STEREO_LEFT_NAME
#define R_IMF_IMTYPE_MULTILAYER
#define R_IMF_PLANES_RGBA
@ R_IMF_VIEWS_MULTIVIEW
@ R_IMF_VIEWS_STEREO_3D
@ R_IMF_VIEWS_INDIVIDUAL
#define STEREO_RIGHT_NAME
#define R_IMF_IMTYPE_OPENEXR
#define R_IMF_PLANES_RGB
static AppView * view
void IMB_colormanagement_colorspace_from_ibuf_ftype(struct ColorManagedColorspaceSettings *colorspace_settings, struct ImBuf *ibuf)
struct ImBuf * IMB_colormanagement_imbuf_for_write(struct ImBuf *ibuf, bool save_as_render, bool allocate_result, const struct ColorManagedViewSettings *view_settings, const struct ColorManagedDisplaySettings *display_settings, struct ImageFormatData *image_format_data)
void imb_freerectfloatImBuf(struct ImBuf *ibuf)
Definition: allocimbuf.c:97
void IMB_freezbuffloatImBuf(struct ImBuf *ibuf)
Definition: allocimbuf.c:186
struct ImBuf * IMB_dupImBuf(const struct ImBuf *ibuf1)
void IMB_freeImBuf(struct ImBuf *ibuf)
Definition: allocimbuf.c:211
bool IMB_prepare_write_ImBuf(const bool isfloat, struct ImBuf *ibuf)
Definition: writeimage.c:68
void imb_freerectImBuf(struct ImBuf *ibuf)
Definition: allocimbuf.c:115
void IMB_freezbufImBuf(struct ImBuf *ibuf)
Definition: allocimbuf.c:172
struct ImBuf * IMB_stereo3d_ImBuf(struct ImageFormatData *im_format, struct ImBuf *ibuf_left, struct ImBuf *ibuf_right)
Definition: stereoimbuf.c:761
bool IMB_isfloat(const struct ImBuf *ibuf)
Contains defines and structs used throughout the imbuf module.
@ IB_BITMAPDIRTY
@ IB_zbuf
@ IB_rectfloat
@ IB_zbuffloat
@ IB_rect
ColorManagedColorspaceSettings colorspace_settings
char filepath[1024]
ListBase tiles
short type
short source
ListBase views
Scene scene
static void imbuf_save_post(ImBuf *ibuf, ImBuf *colormanaged_ibuf)
Definition: image_save.c:121
static void image_save_post(ReportList *reports, Image *ima, ImBuf *ibuf, int ok, ImageSaveOptions *opts, int save_copy, const char *filepath, bool *r_colorspace_changed)
Definition: image_save.c:56
bool BKE_image_save(ReportList *reports, Main *bmain, Image *ima, ImageUser *iuser, ImageSaveOptions *opts)
Definition: image_save.c:397
static bool image_save_single(ReportList *reports, Image *ima, ImageUser *iuser, ImageSaveOptions *opts, bool *r_colorspace_changed)
Definition: image_save.c:141
void BKE_image_save_options_init(ImageSaveOptions *opts, Main *bmain, Scene *scene)
Definition: image_save.c:46
static char ** names
Definition: makesdna.c:162
bool RE_WriteRenderResult(ReportList *reports, RenderResult *rr, const char *filename, ImageFormatData *imf, const char *view, int layer)
bool RE_HasFloatPixels(RenderResult *rr)
float * zbuf_float
int userflags
ImbFormatOptions foptions
unsigned char planes
char name[IMB_FILENAME_SIZE]
enum eImbFileType ftype
unsigned int * rect
float * rect_float
int * zbuf
ColorManagedDisplaySettings display_settings
ColorManagedViewSettings view_settings
struct ImageFormatData im_format
struct Scene * scene
struct Main * bmain
char filepath[1024]
Definition: BKE_main.h:116
ListBase views
Definition: RE_pipeline.h:138
struct RenderData r