Blender V5.3
BKE_image_save.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4#pragma once
5
6#include "DNA_scene_types.h"
7
8namespace blender {
9
13
14struct Image;
15struct ImageUser;
16struct Main;
17struct RenderResult;
18struct ReportList;
19struct Scene;
20
21/* Image datablock saving. */
22
24 /* Context within which image is saved. */
25 Main *bmain = nullptr;
26 Scene *scene = nullptr;
27
28 /* Format and absolute file path. */
30 char filepath[/*FILE_MAX*/ 1024] = "";
31
32 /* Options. */
33 bool relative = false;
34 bool save_copy = false;
35 bool save_as_render = false;
36 bool do_newpath = false;
37
38 /* Original values, so we can restore when type changes back. */
40 char orig_colorspace[/*MAX_COLORSPACE_NAME*/ 64];
41
42 /* Keep track of previous values for auto updates in UI. */
43 bool prev_save_as_render = false;
44 int prev_imtype = false;
45};
46
48 Main *bmain,
49 Scene *scene,
50 Image *ima,
51 ImageUser *iuser,
52 bool guess_path,
53 bool save_as_render);
56
58 ReportList *reports, Main *bmain, Image *ima, ImageUser *iuser, const ImageSaveOptions *opts);
59
60/* Render saving. */
61
67 const RenderResult *rr,
68 const char *filepath,
69 const ImageFormatData *imf,
70 bool save_as_render,
71 const char *view,
72 int layer);
73
79 RenderResult *rr,
80 const Scene *scene,
81 bool stamp,
82 const char *filepath_basis,
83 const ImageFormatData *format = nullptr,
84 bool save_as_render = true);
85
86} // namespace blender
#define layer
BMesh Iterators.
bool BKE_image_render_write(ReportList *reports, RenderResult *rr, const Scene *scene, bool stamp, const char *filepath_basis, const ImageFormatData *format=nullptr, bool save_as_render=true)
bool BKE_image_save_options_init(ImageSaveOptions *opts, Main *bmain, Scene *scene, Image *ima, ImageUser *iuser, bool guess_path, bool save_as_render)
Definition image_save.cc:51
void BKE_image_save_options_free(ImageSaveOptions *opts)
void BKE_image_save_options_update(ImageSaveOptions *opts, const Image *image)
bool BKE_image_render_write_exr(ReportList *reports, const RenderResult *rr, const char *filepath, const ImageFormatData *imf, bool save_as_render, const char *view, int layer)
bool BKE_image_save(ReportList *reports, Main *bmain, Image *ima, ImageUser *iuser, const ImageSaveOptions *opts)