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
 GetTIEBitmap and ReleaseBitmap
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

AndNit

Brazil
81 Posts

Posted - Oct 23 2023 :  19:55:47  Show Profile  Reply
Hello,

I don't know how to use the GetTIEBitmap and ReleaseBitmap functions

I need that when clicking on the thumbnail in my TimageEnMViewer the image is loaded into a TimageEnViewer. With this image loaded, I will add some layers to it. After adding these
layers, I need to update my TimageEnMViewer with the updated image in the TimageEnViewer. How should I proceed in this scenario?

I've already looked at the help, but I really can't reproduce it.

https://www.imageen.com/help/index.php?topic=TImageEnMView.GetTIEBitmap&m=10

Thanks.

xequte

38608 Posts

Posted - Oct 25 2023 :  02:16:25  Show Profile  Reply
Hi

Layers are external to the bitmap, so to see them in the TImageEnMView you need to either:

1. Merge the layers into the bitmap and update the TImageEnMView
2. Save the ImageEnView content (image + layers) to a stream or file and replace the file in the TImageEnMView (by loading from the stream or file).

This is how to do method 1...

//Set idx as the selected image

// Assign the current image to an ImageEnView
bmp := ImageEnMView1.GetTIEBitmap( idx ); 
ImageEnView1.Assign( bmp );
ImageEnMView1.ReleaseBitmap(idx, False);

// Merge layers in ImageEnView and assign back to MView
ImageEnView1.LayersMergeAll(); 
ImageEnMView1.SetImage( idx, ImageEnView1.IEBitmap );


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

AndNit

Brazil
81 Posts

Posted - Oct 25 2023 :  09:32:20  Show Profile  Reply
Oh you taught my friend... thank you very much.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: