Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-04-15 01:24:00 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-04-18 20:42:20 +0300
commit54f420ec4641854f8e254576b314b3d150b643ce (patch)
treee06a51696d492fc5d2b451e3125ddffb243a77ce /source/blender/blenkernel/BKE_image_save.h
parentc2f75c7008d63fef453042c6bcf73b888d6eca39 (diff)
Cleanup: move image saving code to blenkernel.
Diffstat (limited to 'source/blender/blenkernel/BKE_image_save.h')
-rw-r--r--source/blender/blenkernel/BKE_image_save.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_image_save.h b/source/blender/blenkernel/BKE_image_save.h
new file mode 100644
index 00000000000..26c377a2574
--- /dev/null
+++ b/source/blender/blenkernel/BKE_image_save.h
@@ -0,0 +1,67 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ */
+#ifndef __BKE_IMAGE_SAVE_H__
+#define __BKE_IMAGE_SAVE_H__
+
+#include "DNA_scene_types.h"
+
+/** \file
+ * \ingroup bke
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct Image;
+struct Main;
+struct RenderResult;
+struct ReportList;
+struct Scene;
+
+typedef struct ImageSaveOptions {
+ /* Context within which image is saved. */
+ struct Main *bmain;
+ struct Scene *scene;
+
+ /* Format and absolute file path. */
+ struct ImageFormatData im_format;
+ char filepath[1024]; /* 1024 = FILE_MAX */
+
+ /* Options. */
+ bool relative;
+ bool save_copy;
+ bool save_as_render;
+ bool do_newpath;
+} ImageSaveOptions;
+
+void BKE_image_save_options_init(struct ImageSaveOptions *opts,
+ struct Main *bmain,
+ struct Scene *scene);
+bool BKE_image_save(struct ReportList *reports,
+ struct Main *bmain,
+ struct Image *ima,
+ struct ImageUser *iuser,
+ struct ImageSaveOptions *opts);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __BKE_IMAGE_SAVE_H__ */