From 253432bfc7c2a1dae224a03fb3055de19743ec67 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 20 Dec 2006 17:57:56 +0000 Subject: The Big Image refactor! Please read: http://www.blender3d.org/cms/Imaging.834.0.html Or in short: - adding MultiLayer Image support - recoded entire Image API - better integration of movie/sequence Images Was a whole load of work... went down for a week to do this. So, will need a lot of testing! Will be in irc all evening. --- source/blender/imbuf/intern/filter.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'source/blender/imbuf/intern/filter.c') diff --git a/source/blender/imbuf/intern/filter.c b/source/blender/imbuf/intern/filter.c index 343211eb6b0..fd9dac1af2b 100644 --- a/source/blender/imbuf/intern/filter.c +++ b/source/blender/imbuf/intern/filter.c @@ -302,3 +302,28 @@ void IMB_filter_extend(struct ImBuf *ibuf) } } +void IMB_makemipmap(ImBuf *ibuf, int use_filter) +{ + ImBuf *hbuf= ibuf; + int minsize, curmap=0; + + minsize= ibuf->xy?ibuf->x:ibuf->y; + + while(minsize>10 && curmapx, hbuf->y, 32, IB_rect, 0); + IMB_filterN(nbuf, hbuf); + ibuf->mipmap[curmap]= IMB_onehalf(nbuf); + IMB_freeImBuf(nbuf); + } + else { + ibuf->mipmap[curmap]= IMB_onehalf(hbuf); + } + hbuf= ibuf->mipmap[curmap]; + + curmap++; + minsize= hbuf->xy?hbuf->x:hbuf->y; + } +} + + -- cgit v1.2.3