From 137e82f0e6429290919b0bce065fc30ee139d82f Mon Sep 17 00:00:00 2001 From: Kent Mein Date: Tue, 30 Mar 2004 14:33:02 +0000 Subject: Added iris zsize=2 support. Provided by Melchior Franz. Kent --- source/blender/imbuf/intern/iris.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/imbuf/intern/iris.c') 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; -- cgit v1.2.3