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
 Assign without copying

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
quantuz Posted - Aug 29 2014 : 15:27:04
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
4   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Aug 31 2014 : 19:52:27
Please see TIEBitmap.SwitchTo:

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

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
quantuz Posted - Aug 30 2014 : 16:17:00
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
quantuz Posted - Aug 30 2014 : 16:05:07
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
spetric Posted - Aug 30 2014 : 13:51:14
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.