Questions about RvMedia with XE7 (Save image to DbImage)

New product: VCL components for displaying and controlling IP cameras, webcams, video conferencing, video chats
Post Reply
rhernandezb
Posts: 3
Joined: Fri Jan 27, 2017 12:49 pm

Questions about RvMedia with XE7 (Save image to DbImage)

Post by rhernandezb » Fri Jan 27, 2017 12:55 pm

Hi for all, thanks for read my question.....
I try save the snapshot in to Dbimage component and show error "[dcc32 Error] Unit1.pas(109): E2010 Incompatible types: 'TStream' and 'TRVImageWrapper'". I no know how solve this problem....I find in the forum but no appear info..... thanks for any information....

I try with this code


DbAdvPicture1.Picture.LoadFromStream(RVCamera1.GetCurrentImage);

Sergey Tkachenko
Site Admin
Posts: 13584
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Fri Jan 27, 2017 2:53 pm

Code: Select all

var
  ImageWrapper: TRVImageWrapper;

ImageWrapper := RVCamera1.GetSnapShot;
DbAdvPicture1.Picture.Graphic := ImageWrapper.Bitmap.GetBitmap;
ImageWrapper.Free;
It was not mentioned in the help file, but GetSnapShot method works only if RVCamera1 is connected to a viewer or a sender, or OnGetImage event is assigned.
Otherwise, TRVCamera does not decode image frames.

rhernandezb
Posts: 3
Joined: Fri Jan 27, 2017 12:49 pm

Post by rhernandezb » Fri Jan 27, 2017 3:34 pm

Hi, thanks for the information.....I try this code but "graphic" show error

the error is "[dcc32 Error] Unit1.pas(113): E2003 Undeclared identifier: 'Graphic'"


:?:

thanks

rhernandezb
Posts: 3
Joined: Fri Jan 27, 2017 12:49 pm

Solved !!!

Post by rhernandezb » Fri Jan 27, 2017 3:40 pm

Thanks for your code , I change the component AdvDbImage for JvDbImage and works fine !!!!!


procedure TForm1.Button2Click(Sender: TObject);
var
ImageWrapper: TRVImageWrapper;
Begin
ImageWrapper := RVCamera1.GetSnapShot;
JvDbImage1.Picture.Graphic := ImageWrapper.Bitmap.GetBitmap;
ImageWrapper.Free;
end;


very thanks

Post Reply