F-IN-BOX Delphi Edition Help >> How to

Get a Snap image of the current Flash movie frame

You can get a bitmap images from the current flash movie. It means you are able create applications that can coverts Flash movies to a series of bitmaps, JPEGs and others. Also you can build generated images to make an AVI video for example.

[ Delphi ]
procedure TMainForm.ButtonSaveAsBitmapClick(Sender: TObject);
var
  Bitmap: TBitmap;
  Picture: TPicture;
begin
  Picture := TPicture.Create;
  Bitmap := FlashPlayerControl1.CreateFrameBitmap;
  Picture.Bitmap := Bitmap;

  Picture.SaveToFile('Frame.bmp');

  Bitmap.Free;
  Picture.Free;
end;

[ Builder C++ ]
void __fastcall TMainForm::ButtonSaveAsBitmapClick(TObject *Sender)
{
  TPicture* Picture = new TPicture;
  Graphics::TBitmap* Bitmap = FlashPlayerControl1->CreateFrameBitmap();
  Picture->Bitmap = Bitmap;

  Picture->SaveToFile("Frame.bmp");

  delete Bitmap;
  delete Picture;
}

More about TFlashPlayerControl
Copyright © Softanics. All rights reserved
F-IN-BOX is a registered trademark of Softanics|Delphi is a trademark of Borland Software Corporation|Macromedia and Shockwave Flash are trademarks of Adobe, Inc.