ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 overlay on video
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

firemen

2 Posts

Posted - Nov 17 2011 :  13:28:16  Show Profile  Reply
tell me how to implement transparent bitmap rendering when playing video files?
looked at all the examples of playing video files, but did not find as much as possible over the video display transparent bitmap...

fab

1310 Posts

Posted - Nov 18 2011 :  00:31:39  Show Profile  Reply
Please look at "VideoCapture\VideoEffects" example. It puts the video frames in the background layer, and add a new layer with the transparent image.
Go to Top of Page

firemen

2 Posts

Posted - Nov 18 2011 :  10:35:16  Show Profile  Reply
Thank you very much! I looked at this example ..
but in this example creates a layer with a static picture.
I would like to be able to draw on every frame changing its bitmap.
such as to output the karaoke text on the background of videophone.
I can not find similar examples of what would be the quick drawing of a dynamically changing.
for example in an event drawing TVideoGrabber video frame where I can continue to draw on top your bitmap.
sorry for bad english (:
Go to Top of Page

fab

1310 Posts

Posted - Nov 19 2011 :  23:56:48  Show Profile  Reply
That example copies the acquired frame in the background layer in Tfmain.ImageEnView1DShowNewFrame event. Inside it you can also change the layer 1 (semitransparent layer).
The same example shows also how display a text over the acquired frame, maybe it could be useful (look at the code remarked as "// display datatime").

procedure Tfmain.ImageEnView1DShowNewFrame(Sender: TObject);
var
  ss: string;
begin
  ImageEnView1.LayersCurrent:=0;
  ImageEnView1.IO.DShowParams.GetSample(ImageEnView1.IEBitmap);

  // display datatime
  ss := FormatDateTime('c', date + time);
  with ImageEnView1.IEBitmap.Canvas do
  begin
    Brush.Style := bsClear;
    Font.Color := clWhite;
    TextOut(0, 0, ss);
  end;

  // uncomment if you want merge image also in the saved AVI
  //ImageEnView1.LayersMerge(0,1,false);

  ImageEnView1.IO.SaveToAVI;

  ImageEnView1.Update;

  ImageEnView1.Paint;
end;
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: