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 without copying
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

quantuz

Sweden
55 Posts

Posted - Aug 29 2014 :  15:27:04  Show Profile  Reply
Hi!
I want to assign a TIEBitmap to another TIEBitmap without actually copying the bitmap just take over the source pointer. I asume I should use TIEBitmap.EncapsulateMemory(), is there some other way to do it?
And if I use bitmapA.EncapsulateMemory(bitmapB,...DoFreeImage=true) and the delete bitmapB what happens to bitmapA? do I destroy it?

Best Regards
//Christer

spetric

Croatia
308 Posts

Posted - Aug 30 2014 :  13:51:14  Show Profile  Reply
Hi,

you don't have to use encapsulation when you have two TIEBitmaps.
Encapsulation is required when you have TBitmap and you want to use some TIEBitmap specific methods on TBitmap.

Go to Top of Page

quantuz

Sweden
55 Posts

Posted - Aug 30 2014 :  16:05:07  Show Profile  Reply
Hi!

Ok but if I dont have to use encapsulation how do I do it as I always work with TIEBitmap? iebitmapA->AssignImage(iebitmapB) actually makes a copy.

//Christer
Go to Top of Page

quantuz

Sweden
55 Posts

Posted - Aug 30 2014 :  16:17:00  Show Profile  Reply
Hi again,
To clerify things, we want to make one TIEbitmap take over the bitmap o another TIEbitmap. The latter will then be deleted. ( this is part of a strategy to avoid holes in the heap)
//Christer
Go to Top of Page

xequte

38616 Posts

Posted - Aug 31 2014 :  19:52:27  Show Profile  Reply
Please see TIEBitmap.SwitchTo:

http://www.imageen.com/help/TIEBitmap.SwitchTo.html

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