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/imbuf/intern/scaling.c | |
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/imbuf/intern/scaling.c')
-rw-r--r-- | source/blender/imbuf/intern/scaling.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/scaling.c b/source/blender/imbuf/intern/scaling.c index 0b8dea01ada..4fccf5dae41 100644 --- a/source/blender/imbuf/intern/scaling.c +++ b/source/blender/imbuf/intern/scaling.c @@ -1439,7 +1439,7 @@ static void scalefast_Z_ImBuf(ImBuf *ibuf, short newx, short newy) } } -struct ImBuf *IMB_scaleImBuf(struct ImBuf * ibuf, short newx, short newy) +struct ImBuf *IMB_scaleImBuf(struct ImBuf * ibuf, unsigned int newx, unsigned int newy) { if (ibuf==NULL) return (0); if (ibuf->rect==NULL && ibuf->rect_float==NULL) return (ibuf); @@ -1468,7 +1468,7 @@ struct imbufRGBA { float r, g, b, a; }; -struct ImBuf *IMB_scalefastImBuf(struct ImBuf *ibuf, short newx, short newy) +struct ImBuf *IMB_scalefastImBuf(struct ImBuf *ibuf, unsigned int newx, unsigned int newy) { unsigned int *rect,*_newrect,*newrect; struct imbufRGBA *rectf, *_newrectf, *newrectf; |