← Back to team overview

openshot.code team mailing list archive

[Merge] lp:~mbranton/libopenshot/alpha-channel-fix into lp:libopenshot

 

matt has proposed merging lp:~mbranton/libopenshot/alpha-channel-fix into lp:libopenshot.

Requested reviews:
  OpenShot Code (openshot.code)

For more details, see:
https://code.launchpad.net/~mbranton/libopenshot/alpha-channel-fix/+merge/307505

Color::GetColorHex was returning a value that dropped the alpha channel, resulting in incorrect colors being passed to flood fill. Since it explicitly gets the alpha channel only to immediately discard it I think this is a bug. It also has the side effect of fixing the timeline so that if you specify an alpha channel for the background color it will be preserved if the color is non black.
-- 
Your team OpenShot Code is requested to review the proposed merge of lp:~mbranton/libopenshot/alpha-channel-fix into lp:libopenshot.
=== modified file 'src/Color.cpp'
--- src/Color.cpp	2015-10-01 23:51:59 +0000
+++ src/Color.cpp	2016-10-04 02:28:50 +0000
@@ -68,7 +68,7 @@
 	int b = blue.GetInt(frame_number);
 	int a = alpha.GetInt(frame_number);
 
-	return QColor( r,g,b,a ).name().toStdString();
+	return QColor( r,g,b,a ).name(QColor::HexArgb).toStdString();
 }
 
 // Get the distance between 2 RGB pairs (alpha is ignored)