git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1205
d19143bc-622f-0410-bfdd-
b5b2a6649095
if ( mlt_frame_get_image( this, image, format, width, height, writable ) == 0 )
{
uint8_t *p = *image;
- uint8_t A = invert? 16 : 235;
- uint8_t B = invert? 235 : 16;
+ uint8_t A = invert? 235 : 16;
+ uint8_t B = invert? 16 : 235;
int size = *width * *height;
if ( !use_alpha )
{
while( size -- )
{
- if ( *p >= midpoint )
+ if ( *p < midpoint )
*p ++ = A;
else
*p ++ = B;
while( size -- )
{
if ( *alpha ++ < midpoint )
- *p ++ = B;
- else
*p ++ = A;
+ else
+ *p ++ = B;
*p ++ = 128;
}
}