Cleanup: use const image-format arg

This commit is contained in:
2016-01-11 12:01:08 +11:00
parent 2c8ca79683
commit f28d3955e9
2 changed files with 15 additions and 8 deletions

View File

@@ -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_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_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_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); 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); int BKE_imbuf_write_stamp(
void BKE_imbuf_write_prepare(struct ImBuf *ibuf, struct ImageFormatData *imf); struct Scene *scene, struct RenderResult *rr, struct ImBuf *ibuf, const char *name,
int BKE_imbuf_write(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf); 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); int BKE_imbuf_write_as(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf, const bool is_copy);
void BKE_image_path_from_imformat( void BKE_image_path_from_imformat(
char *string, const char *base, const char *relbase, int frame, 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 */ /* adds image, adds ibuf, generates color or pattern */
struct Image *BKE_image_add_generated( 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 */ /* adds image from imbuf, owns imbuf */
struct Image *BKE_image_add_from_imbuf(struct ImBuf *ibuf, const char *name); struct Image *BKE_image_add_from_imbuf(struct ImBuf *ibuf, const char *name);

View File

@@ -2166,7 +2166,7 @@ bool BKE_imbuf_alpha_test(ImBuf *ibuf)
/* note: imf->planes is ignored here, its assumed the image channels /* note: imf->planes is ignored here, its assumed the image channels
* are already set */ * 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 imtype = imf->imtype;
char compress = imf->compress; 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; int ok;
@@ -2337,7 +2337,9 @@ int BKE_imbuf_write_as(ImBuf *ibuf, const char *name, ImageFormatData *imf,
return ok; 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) if (scene && scene->r.stamp & R_STAMP_ALL)
BKE_imbuf_stamp_info(rr, ibuf); BKE_imbuf_stamp_info(rr, ibuf);