Fix for bug #1100
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user