Added a new experimental overlay method to a frame, which composites images from multiple frames, and adds the result to the bottom right side of the image.

This commit is contained in:
Jonathan Thomas
2012-08-29 16:07:47 -05:00
parent b3cf902f22
commit 63529bd158
3 changed files with 27 additions and 5 deletions

View File

@@ -502,6 +502,22 @@ void Frame::AddEffect(string name)
image->swirl(30.0);
}
// Experimental method to add overlay images to this frame
void Frame::AddOverlay(Frame* frame)
{
// Get overlay image (if any)
Magick::Image* overlay = frame->GetImage();
// Composite image onto this image
image->composite(*overlay, Magick::SouthEastGravity, Magick::OverCompositeOp);
}
// Get pointer to Magick++ image object
Magick::Image* Frame::GetImage()
{
return image;
}
// Play audio samples for this frame
void Frame::Play()
{