You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Added experimental AddEffect method to the frame object, to apply image effects
This commit is contained in:
@@ -435,6 +435,19 @@ void Frame::AddAudio(int destChannel, int destStartSample, const float* source,
|
||||
audio->addFrom(destChannel, destStartSample, source, numSamples, gainToApplyToSource);
|
||||
}
|
||||
|
||||
// Experimental method to add effects to this frame
|
||||
void Frame::AddEffect(string name)
|
||||
{
|
||||
if (name == "negate")
|
||||
image->negate(false);
|
||||
else if (name == "flip")
|
||||
image->flip();
|
||||
else if (name == "oilPaint")
|
||||
image->oilPaint(3.0);
|
||||
else if (name == "swirl")
|
||||
image->swirl(30.0);
|
||||
}
|
||||
|
||||
// Play audio samples for this frame
|
||||
void Frame::Play()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user