You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
The timeline classes are finally working correctly, and have the following features:
1) Layers (unlimited # of layers) 2) IN, OUT, and Position (time) 3) X, Y offset 4) Alpha 5) Rotation 6) Transparency + compositing + overlays
This commit is contained in:
@@ -430,6 +430,9 @@ void Frame::AddColor(int width, int height, string color)
|
||||
// Create new image object, and fill with pixel data
|
||||
image = tr1::shared_ptr<Magick::Image>(new Magick::Image(Magick::Geometry(width, height), Magick::Color(color)));
|
||||
|
||||
// Give image a transparent background color
|
||||
image->backgroundColor(Magick::Color("none"));
|
||||
|
||||
// Update height and width
|
||||
width = image->columns();
|
||||
height = image->rows();
|
||||
@@ -441,6 +444,9 @@ void Frame::AddImage(int width, int height, const string map, const Magick::Stor
|
||||
// Create new image object, and fill with pixel data
|
||||
image = tr1::shared_ptr<Magick::Image>(new Magick::Image(width, height, map, type, pixels));
|
||||
|
||||
// Give image a transparent background color
|
||||
image->backgroundColor(Magick::Color("none"));
|
||||
|
||||
// Update height and width
|
||||
width = image->columns();
|
||||
height = image->rows();
|
||||
@@ -520,6 +526,10 @@ void Frame::AddImage(tr1::shared_ptr<Magick::Image> new_image, float alpha)
|
||||
// Add audio samples to a specific channel
|
||||
void Frame::AddAudio(int destChannel, int destStartSample, const float* source, int numSamples, float gainToApplyToSource = 1.0f)
|
||||
{
|
||||
// Extend audio buffer (if needed)
|
||||
if (destStartSample + numSamples > audio->getNumSamples())
|
||||
audio->setSize(audio->getNumChannels(), destStartSample + numSamples, true, true, false);
|
||||
|
||||
// Always clear the range of samples first
|
||||
audio->clear(destChannel, destStartSample, numSamples);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user