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

Proposed by matt
Status: Needs review
Proposed branch: lp:~mbranton/libopenshot/alpha-channel-fix
Merge into: lp:libopenshot/0.0
Diff against target: 12 lines (+1/-1)
1 file modified
src/Color.cpp (+1/-1)
To merge this branch: bzr merge lp:~mbranton/libopenshot/alpha-channel-fix
Reviewer Review Type Date Requested Status
OpenShot Code Pending
Review via email: mp+307505@code.launchpad.net

Description of the change

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.

To post a comment you must log in.

Unmerged revisions

561. By Matt Branton <email address hidden>

Set color format so that alpha can be preserved on flood fills

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Color.cpp'
2--- src/Color.cpp 2015-10-01 23:51:59 +0000
3+++ src/Color.cpp 2016-10-04 02:28:50 +0000
4@@ -68,7 +68,7 @@
5 int b = blue.GetInt(frame_number);
6 int a = alpha.GetInt(frame_number);
7
8- return QColor( r,g,b,a ).name().toStdString();
9+ return QColor( r,g,b,a ).name(QColor::HexArgb).toStdString();
10 }
11
12 // Get the distance between 2 RGB pairs (alpha is ignored)

Subscribers

People subscribed via source and target branches