diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-09-28 14:03:56 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-09-28 14:03:56 +0400 |
commit | 8df244f20dc4a2d92bbe496f123f2d6578167949 (patch) | |
tree | 93b4f34ee3cd5f98e30a3ebe324fdd59669e9ca1 /source/blender/blenkernel | |
parent | 8d50b283cbc663f08b0c4b0e43ed8fdee4a93549 (diff) |
images bigger then 32k no longer crash blender, use unsigned int for image size rather then short.
also check if jpeg fails to allocate an imbuf.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_image.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 3 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 4 |
3 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h index e246b51af09..0a07e6d482c 100644 --- a/source/blender/blenkernel/BKE_image.h +++ b/source/blender/blenkernel/BKE_image.h @@ -115,7 +115,7 @@ void BKE_image_release_ibuf(struct Image *ima, void *lock); struct Image *BKE_add_image_file(const char *name, int frame); /* adds image, adds ibuf, generates color or pattern */ -struct Image *BKE_add_image_size(int width, int height, char *name, int depth, int floatbuf, short uvtestgrid, float color[4]); +struct Image *BKE_add_image_size(unsigned int width, unsigned int height, char *name, int depth, int floatbuf, short uvtestgrid, float color[4]); /* adds image from imbuf, owns imbuf */ struct Image *BKE_add_image_imbuf(struct ImBuf *ibuf); diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 59e81293c9f..fe69f13bbda 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -4358,8 +4358,7 @@ void get_constraint_target_matrix (struct Scene *scene, bConstraint *con, int n, void solve_constraints (ListBase *conlist, bConstraintOb *cob, float ctime) { bConstraint *con; - float solution[4][4], delta[4][4]; - float oldmat[4][4], imat[4][4]; + float oldmat[4][4]; float enf; /* check that there is a valid constraint object to evaluate */ diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index a199c1cf738..cb2261932ce 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -382,7 +382,7 @@ Image *BKE_add_image_file(const char *name, int frame) return ima; } -static ImBuf *add_ibuf_size(int width, int height, char *name, int depth, int floatbuf, short uvtestgrid, float color[4]) +static ImBuf *add_ibuf_size(unsigned int width, unsigned int height, char *name, int depth, int floatbuf, short uvtestgrid, float color[4]) { ImBuf *ibuf; unsigned char *rect= NULL; @@ -415,7 +415,7 @@ static ImBuf *add_ibuf_size(int width, int height, char *name, int depth, int fl } /* adds new image block, creates ImBuf and initializes color */ -Image *BKE_add_image_size(int width, int height, char *name, int depth, int floatbuf, short uvtestgrid, float color[4]) +Image *BKE_add_image_size(unsigned int width, unsigned int height, char *name, int depth, int floatbuf, short uvtestgrid, float color[4]) { /* on save, type is changed to FILE in editsima.c */ Image *ima= image_alloc(name, IMA_SRC_GENERATED, IMA_TYPE_UV_TEST); |