Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
Sybren
Posted - Apr 10 2020 : 09:29:23 I'd like to create a movie from a series of view changes of a photosphere image. I can create view changes of the image on screen by setting values for:
with (PanView.IEBitmap.VirtualBitmapProvider as TIEEquirectangularRenderer) do
begin
CamHeading := path[i].Heading;
CamPitch := path[i].Pitch;
end;
PanView.Update();
where the 'path[i]' record contains the floating points values of the stepwise view changes. I use a straightforward 'from .. to .. do' loop with the i parameter to create all the PanView views.
The issue I now have is that I cannot assign the resulting image after each view change step into another IEBitmap, which is then saved, to be used later as a frame in the movie. If I assign the PanView bitmap to a new ImageEnView ('video'): Video.IEBitmap.Assign(PanView.IEBitmap) I get an EAccessViolation error exception. Apparently the IEBitmap from PanView cannot be assigned because of being a virtual bitmap? I also get an EAccessViolation error when trying to save the PanView.IO.SaveToFileJPEG().
My question: how can I save/assign the resulting view with every PanView change?
1 L A T E S T R E P L I E S (Newest First)
xequte
Posted - Apr 13 2020 : 19:33:41 Hi
Please email me for a version which supports DrawTo:
// Output current view as a JPEG
var
bmp: TIEBitmap;
begin
bmp := TIEBitmap.Create;
bmp.Allocate( ImageEnView1.IEBitmap.width, ImageEnView1.IEBitmap.Height );
with ImageEnView1.IEBitmap.VirtualBitmapProvider as TIEEquirectangularRenderer do
DrawTo( bmp );
bmp.Write('D:\view.jpg');
bmp.Free;
end;