diff --git a/include/Clip.h b/include/Clip.h index f924691d..8092f895 100644 --- a/include/Clip.h +++ b/include/Clip.h @@ -218,7 +218,7 @@ namespace openshot { Keyframe location_y; ///< Curve representing the relative Y position in percent based on the gravity (-100 to 100) // Alpha and Rotation curves - Keyframe alpha; ///< Curve representing the alpha or transparency (0 to 1) + Keyframe alpha; ///< Curve representing the alpha (1 to 0) Keyframe rotation; ///< Curve representing the rotation (0 to 360) // Time and Volume curves diff --git a/src/Clip.cpp b/src/Clip.cpp index c32a6794..8b085bff 100644 --- a/src/Clip.cpp +++ b/src/Clip.cpp @@ -52,7 +52,7 @@ void Clip::init_settings() location_y = Keyframe(0.0); // Init alpha & rotation - alpha = Keyframe(0.0); + alpha = Keyframe(1.0); rotation = Keyframe(0.0); // Init time & volume diff --git a/src/Timeline.cpp b/src/Timeline.cpp index 3faefd83..9973a665 100644 --- a/src/Timeline.cpp +++ b/src/Timeline.cpp @@ -289,7 +289,7 @@ void Timeline::add_layer(tr1::shared_ptr new_frame, Clip* source_clip, lo int source_height = source_image->height(); /* ALPHA & OPACITY */ - if (source_clip->alpha.GetValue(clip_frame_number) != 0) + if (source_clip->alpha.GetValue(clip_frame_number) != 1.0) { float alpha = source_clip->alpha.GetValue(clip_frame_number); @@ -303,7 +303,7 @@ void Timeline::add_layer(tr1::shared_ptr new_frame, Clip* source_clip, lo int A = pixels[byte_index + 3]; // Apply alpha to pixel - pixels[byte_index + 3] *= (1.0 - alpha); + pixels[byte_index + 3] *= alpha; } // Debug output