Under Windows, Quicktime images with a depth < 32 didn't
show up in the sequence editor. To fix this a non transparent layer was added to them. (bf227-bf232)

I now have disabled this trick for GIF images, so the transparency is preserved. But this is a quick fix and
should be replaced by a transparency check function.
This commit is contained in:
Rob Haarsma
2004-04-09 14:09:56 +00:00
parent c9d7d11215
commit a7354ea007

View File

@@ -51,6 +51,7 @@
#endif /* _WIN32 */
#include "quicktime_import.h"
#include "quicktime_export.h"
#define RECT_WIDTH(r) (r.right-r.left)
@@ -652,16 +653,21 @@ bail:
}
if(ibuf) {
#ifdef _WIN32
// add alpha layer, might also be nescessary for OSX
// add non transparent alpha layer, so images without alpha show up in the sequence editor
// exception for GIF images since these can be transparent without being 32 bit
// (might also be nescessary for OSX)
int i;
int box = x * y;
unsigned char *arect = (unsigned char *) ibuf->rect;
if(depth < 32)
if( depth < 32 && (**desc).cType != kGIFCodecType) {
for(i = 0; i < box; i++, arect+=4)
arect[3] = 0xFF;
}
#endif
IMB_flipy(ibuf);
ibuf->ftype = QUICKTIME;
}