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
 background image alignment
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

email_toan

USA
23 Posts

Posted - Jun 10 2022 :  13:41:01  Show Profile  Reply
I'm seeing an unexpected behavior when comparing background image to a layer's image.

Here's my code:
ImageEnView1.IO.LoadFromFilePNG('320_240_line.png'); //background image
ImageEnView1.LayersAdd(ImageEnView1.IEBitmap,0,0); //exact image as layer 1


I expected both images to be exactly over each other. However, when I zoomed in
I can see they're out of alignment. I added a trackbar to control layer1's opacity
to verify my observation.

What I need to do to make it so they're exactly over each other?

Preview:



Sample project:
attach/email_toan/2022610132552_Release.zip
3147.2 KB

xequte

38610 Posts

Posted - Jun 12 2022 :  16:34:44  Show Profile  Reply
I'm not seeing that when I recreate your project. What is the zoom level? Do both layers have the same zoom filter?



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

email_toan

USA
23 Posts

Posted - Jun 12 2022 :  19:52:04  Show Profile  Reply
Any zoom level. There is only one layer, layer 1. The other is the background image. I did not change the zoom filter so I'm assuming it's whatever the default is.

tn
Go to Top of Page

xequte

38610 Posts

Posted - Jun 12 2022 :  22:41:14  Show Profile  Reply
I see now. At higher zoom levels you can get slight movement due to rounding. You can fix this by explicitly enabling Layer editing:

ImageEnView1.LayerEditingMode := True;


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