diff options
author | Kent Mein <mein@cs.umn.edu> | 2004-03-30 18:33:02 +0400 |
---|---|---|
committer | Kent Mein <mein@cs.umn.edu> | 2004-03-30 18:33:02 +0400 |
commit | 137e82f0e6429290919b0bce065fc30ee139d82f (patch) | |
tree | f68ac68fde2c88c4bf6a5a069e0ecf3f2c422e95 /source | |
parent | 514edaa6bba32e167c1deb64f9b818d94110bf77 (diff) |
Added iris zsize=2 support. Provided by Melchior Franz.
Kent
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/imbuf/intern/iris.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c index 469bbc414e5..499154d565a 100644 --- a/source/blender/imbuf/intern/iris.c +++ b/source/blender/imbuf/intern/iris.c @@ -382,6 +382,14 @@ struct ImBuf *imb_loadiris(unsigned char *mem, int flags) rect[1] = rect[2] = rect[3]; rect += 4; } + } else if (image.zsize == 2){ + /* grayscale with alpha */ + rect = (uchar *) ibuf->rect; + for (x = ibuf->x * ibuf->y; x > 0; x--) { + rect[0] = rect[2]; + rect[1] = rect[2] = rect[3]; + rect += 4; + } } else if (image.zsize == 3){ /* add alpha */ rect = (uchar *) ibuf->rect; |