I have a WriteableBitmap that would display video in the Window. Currently I need to covert the subtitle in the bottom. I want to use a aero effect, but only cover the bottom of the WriteableBitmap.
Which mean, this is the original :
And I want to add a Grid Control which has aero effect, like This:
But I don't know how, I already think about take the picture bottom place and use some effect , and then put it on the top, But It looks a low performance for writableBitmap, because which mean it need to process 25 around picture every second...
Update: Here is my code:
<Grid>
<Image x:Name="imgFrame"/>
</Grid>
private WriteableBitmap bitmap;
private void OnVideoFrameRunning(FrameArgs e)
{
if (null == bitmap)
{
bitmap = new WriteableBitmap(e.Width, e.Height, 72, 72,PixelFormats.Bgr24, null);
imgFrame.Source = bitmap;
}
bitmap.WritePixels(new Int32Rect(0, 0, e.Width, e.Height), e.Buffer, e.Width * 3, 0, 0);
}

