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
 fit and center are not always working
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Dany

59 Posts

Posted - Oct 24 2024 :  08:18:25  Show Profile  Reply
Hello;

In some cases, on the ImageEnView component the image goes out of marging to the left-top, even is CENTER=True, and even after executing FIT, but I can't find out why. And then, every image I send to this ImageEnView will be seen with the same problem.

For example, I do this:

ImgDisplay.LayersMerge(True); // to merge leyer 1 to the backwround.
ImgDisplay.IEBitmap.Resample(FMaxSize, FMaxSize, rfLanczos3, True, True); // to be sure the image is not bigger than the accepted size.

And after, all the images I load on the ImgDisplay component will be out of marging to the left-top, even I do a clearall on it before, and even if I excecute FIT after loading the image. Here is an example:



You can see on the left the whole image. If I change to other image in the left, it will be showed with same error.

What can it be my error?

Thank you!


Dany

59 Posts

Posted - Oct 24 2024 :  12:59:52  Show Profile  Reply
Hi,

Let me add: I tried to see what happens if I do not do the resample, but the problem is the same. It seems it happen when layer 1 is bigger than layer 0. And it only happens if I moved the layer from the initial position.
Go to Top of Page

xequte

38610 Posts

Posted - Oct 24 2024 :  18:28:22  Show Profile  Reply
Hi

You should call ImageEnView1.Update() after ImageEnView1.IEBitmap.Resample(). Does that make any difference?

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