Page 1 of 1

Questions about RvMedia with XE7 (Save image to DbImage)

Posted: Fri Jan 27, 2017 12:55 pm
by rhernandezb
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);

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

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.

Posted: Fri Jan 27, 2017 3:34 pm
by rhernandezb
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

Solved !!!

Posted: Fri Jan 27, 2017 3:40 pm
by rhernandezb
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