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
 AddLayers ielkImage seems to have different size compared to another layer
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

AdrianKnowles

USA
35 Posts

Posted - Sep 21 2023 :  00:27:43  Show Profile  Reply
Hi,
I have two .png files containing the same icon just rotated. Both are 44x44 pixels

I add each of these into separate layers using the following code

LineTestImageEnView.LayersAdd( ielkImage, GrabTopx, GrabTopY, 50, 50 );
LineTestImageEnView.IO.LoadFromFile(ExtractFilePath(Application.ExeName) + 'UpDown2.png');

LineTestImageEnView.LayersAdd( ielkImage, GrabBotx, GrabBotY, 50, 50 );
LineTestImageEnView.IO.LoadFromFile(ExtractFilePath(Application.ExeName) + 'LeftRight.png');

However they appear to be different sizes. See attached image showing the two round icons

Am I doing something wrong?

Kind regards,
Adrian


xequte

38207 Posts

Posted - Sep 21 2023 :  02:06:50  Show Profile  Reply
Hi Adrian

I cannot reproduce that. Can you give me more information:

procedure Tfmain.Button1Click(Sender: TObject);
const
  GrabTopx = 100;
  GrabTopY = 100;
  GrabBotX = 100;
  GrabBotY = 200;
begin
  ImageEnView1.LayersAdd( ielkImage, GrabTopx, GrabTopY, 50, 50 );
  ImageEnView1.IO.LoadFromFile( 'D:\UpDown2.png');

  ImageEnView1.LayersAdd( ielkImage, GrabBotx, GrabBotY, 50, 50 );
  ImageEnView1.IO.LoadFromFile( 'D:\LeftRight.png');
end;


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

AdrianKnowles

USA
35 Posts

Posted - Sep 21 2023 :  07:44:50  Show Profile  Reply
Hi,
I recreated both .png's in photoshop and now seems ok. Previously one was created in Affinity designer and one in Photoshop (I couldnt see any differences in the header though, weird)

Kind regards,
Adrian
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: