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
 Assign the Photosphere to an IEBitmap
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Sybren

32 Posts

Posted - Apr 10 2020 :  09:29:23  Show Profile  Reply
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?

xequte

38180 Posts

Posted - Apr 13 2020 :  19:33:41  Show Profile  Reply
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;


Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: