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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2016-01-11 04:01:08 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-01-11 04:01:08 +0300
commitf28d3955e9c848c32e340ec6696142ef124562d5 (patch)
tree62c0535c910c3a29f693350ca2a7bd95ebbe4ad2 /source
parent2c8ca79683ee76392c3185c85502f69505c4b98d (diff)
Cleanup: use const image-format arg
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/BKE_image.h15
-rw-r--r--source/blender/blenkernel/intern/image.c8
2 files changed, 15 insertions, 8 deletions
diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h
index ff0b5a1d4bf..1d4a405a89c 100644
--- a/source/blender/blenkernel/BKE_image.h
+++ b/source/blender/blenkernel/BKE_image.h
@@ -67,11 +67,15 @@ void BKE_render_result_stamp_info(struct Scene *scene, struct Object *camera,
void BKE_imbuf_stamp_info(struct RenderResult *rr, struct ImBuf *ibuf);
void BKE_stamp_info_from_imbuf(struct RenderResult *rr, struct ImBuf *ibuf);
void BKE_stamp_info_callback(void *data, struct StampData *stamp_data, StampCallback callback, bool noskip);
-void BKE_image_stamp_buf(struct Scene *scene, struct Object *camera, unsigned char *rect, float *rectf, int width, int height, int channels);
+void BKE_image_stamp_buf(
+ struct Scene *scene, struct Object *camera,
+ unsigned char *rect, float *rectf, int width, int height, int channels);
bool BKE_imbuf_alpha_test(struct ImBuf *ibuf);
-int BKE_imbuf_write_stamp(struct Scene *scene, struct RenderResult *rr, struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf);
-void BKE_imbuf_write_prepare(struct ImBuf *ibuf, struct ImageFormatData *imf);
-int BKE_imbuf_write(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf);
+int BKE_imbuf_write_stamp(
+ struct Scene *scene, struct RenderResult *rr, struct ImBuf *ibuf, const char *name,
+ const struct ImageFormatData *imf);
+void BKE_imbuf_write_prepare(struct ImBuf *ibuf, const struct ImageFormatData *imf);
+int BKE_imbuf_write(struct ImBuf *ibuf, const char *name, const struct ImageFormatData *imf);
int BKE_imbuf_write_as(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf, const bool is_copy);
void BKE_image_path_from_imformat(
char *string, const char *base, const char *relbase, int frame,
@@ -181,7 +185,8 @@ struct Image *BKE_image_load_exists(const char *filepath);
/* adds image, adds ibuf, generates color or pattern */
struct Image *BKE_image_add_generated(
- struct Main *bmain, unsigned int width, unsigned int height, const char *name, int depth, int floatbuf, short gen_type, const float color[4], const bool stereo3d);
+ struct Main *bmain, unsigned int width, unsigned int height, const char *name,
+ int depth, int floatbuf, short gen_type, const float color[4], const bool stereo3d);
/* adds image from imbuf, owns imbuf */
struct Image *BKE_image_add_from_imbuf(struct ImBuf *ibuf, const char *name);
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 330148b3a94..f640f113c04 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -2166,7 +2166,7 @@ bool BKE_imbuf_alpha_test(ImBuf *ibuf)
/* note: imf->planes is ignored here, its assumed the image channels
* are already set */
-void BKE_imbuf_write_prepare(ImBuf *ibuf, ImageFormatData *imf)
+void BKE_imbuf_write_prepare(ImBuf *ibuf, const ImageFormatData *imf)
{
char imtype = imf->imtype;
char compress = imf->compress;
@@ -2298,7 +2298,7 @@ void BKE_imbuf_write_prepare(ImBuf *ibuf, ImageFormatData *imf)
}
}
-int BKE_imbuf_write(ImBuf *ibuf, const char *name, ImageFormatData *imf)
+int BKE_imbuf_write(ImBuf *ibuf, const char *name, const ImageFormatData *imf)
{
int ok;
@@ -2337,7 +2337,9 @@ int BKE_imbuf_write_as(ImBuf *ibuf, const char *name, ImageFormatData *imf,
return ok;
}
-int BKE_imbuf_write_stamp(Scene *scene, struct RenderResult *rr, ImBuf *ibuf, const char *name, struct ImageFormatData *imf)
+int BKE_imbuf_write_stamp(
+ Scene *scene, struct RenderResult *rr, ImBuf *ibuf, const char *name,
+ const struct ImageFormatData *imf)
{
if (scene && scene->r.stamp & R_STAMP_ALL)
BKE_imbuf_stamp_info(rr, ibuf);