ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 m_segmentbuffer in iexVirtaulbitmaps is always NIL

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
harry stahl Posted - Dec 21 2021 : 13:29:40
While your photosphere demo is working fine, I have problems to take it over in my application.

THere is an ImagenEnView (iView), that displays images (legay bitmap is used).

Now there is a 360% image, that I want to display. User can press a button to activate this. In onclick-Event I do the following:

iProvider.IO.LoadFromFile (fn);
iProvider.Update;

iview.IEBitmap.VirtualBitmapProvider := TIEEquirectangularRenderer.Create(iProvider);
iView.Update;

In the mousemoveEvent is your source. But app crashes, in unit iexVirtualbitmaps, in func "TIEEquirectangularRenderer.GetSegment", because m_segmentBuffer is NIL.

Is there a special setting neccessary, that this works also in my app?

edit: if I copy your template and use this, it works. But I create and use all my ImageEnview in this unit at runtime, so what special settings I have to set here?


HS
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Dec 21 2021 : 22:46:32
Hi Harry

Actually, it looks like GetSegment is not properly initialized (because it is not used by default).

Can you try changing iexVirtualBitmaps.pas as follows:

function TIEEquirectangularRenderer.GetSegment(Container: TIEBitmap; Row: integer; Col: integer; Width: integer): pointer;
...
begin
  if not assigned( m_segmentBuffer ) then
    m_segmentBuffer := TIEBitmap.Create();
  if (m_segmentBuffer.Width <> Width) or (m_segmentBuffer.Height <> 1) then
    m_segmentBuffer.Allocate(Width, 1);
...
end;


Nigel
Xequte Software
www.imageen.com