Fix related to #29694: quicktime export was not showing or respecting RGBA
option even though some movie formats support alpha.
This commit is contained in:
@@ -950,6 +950,7 @@ char BKE_imtype_valid_channels(const char imtype)
|
|||||||
case R_IMF_IMTYPE_MULTILAYER:
|
case R_IMF_IMTYPE_MULTILAYER:
|
||||||
case R_IMF_IMTYPE_DDS:
|
case R_IMF_IMTYPE_DDS:
|
||||||
case R_IMF_IMTYPE_JP2:
|
case R_IMF_IMTYPE_JP2:
|
||||||
|
case R_IMF_IMTYPE_QUICKTIME:
|
||||||
chan_flag |= IMA_CHAN_FLAG_ALPHA;
|
chan_flag |= IMA_CHAN_FLAG_ALPHA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -604,13 +604,14 @@ int append_qt(struct RenderData *rd, int frame, int *pixels, int rectx, int rect
|
|||||||
OSStatus err = noErr;
|
OSStatus err = noErr;
|
||||||
unsigned char *from_Ptr,*to_Ptr;
|
unsigned char *from_Ptr,*to_Ptr;
|
||||||
int y,from_i,to_i;
|
int y,from_i,to_i;
|
||||||
|
BOOL alpha = (rd->im_format.planes == R_IMF_PLANES_RGBA)? YES: NO;
|
||||||
|
|
||||||
|
|
||||||
/* Create bitmap image rep in blender format (32bit RGBA) */
|
/* Create bitmap image rep in blender format (32bit RGBA) */
|
||||||
blBitmapFormatImage = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL
|
blBitmapFormatImage = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL
|
||||||
pixelsWide:rectx
|
pixelsWide:rectx
|
||||||
pixelsHigh:recty
|
pixelsHigh:recty
|
||||||
bitsPerSample:8 samplesPerPixel:4 hasAlpha:YES isPlanar:NO
|
bitsPerSample:8 samplesPerPixel:4 hasAlpha:alpha isPlanar:NO
|
||||||
colorSpaceName:NSCalibratedRGBColorSpace
|
colorSpaceName:NSCalibratedRGBColorSpace
|
||||||
bitmapFormat:NSAlphaNonpremultipliedBitmapFormat
|
bitmapFormat:NSAlphaNonpremultipliedBitmapFormat
|
||||||
bytesPerRow:rectx*4
|
bytesPerRow:rectx*4
|
||||||
|
|||||||
Reference in New Issue
Block a user