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
 PixelFormat change does not trigger TImageEnView.OnImageChange
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

933 Posts

Posted - Oct 17 2022 :  13:07:00  Show Profile  Reply
I change the PixelFormat of the image in an ImageEnView with this code:

IEGlobalSettings().AutoSetBitDepth := True;
  ImageEnView1.IEBitmap.PixelFormat := ie1g;
  ImageEnView1.Update;
  ShowPixelFormatOnToolbar;


Unfortunately, this does not trigger the OnImageChange Event-Handler!

Is my code incorrect?

xequte

38608 Posts

Posted - Oct 17 2022 :  20:42:11  Show Profile  Reply
Hi Peter

Yes, that is correct. OnImageChange is only called by changes by editing methods in TImageEnProc or in TImageEnView (e.g. TImageEnView.Clear). Not by changes to the TImageEnView.IEBitmap.

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

PeterPanino

933 Posts

Posted - Oct 18 2022 :  02:44:13  Show Profile  Reply
Hi Nigel

Is that logical? After all, a CHANGE to the TImageEnView.IEBitmap is indeed a CHANGE.

So how can I be notified if something implicitly changes the PixelFormat of the image?
Go to Top of Page

xequte

38608 Posts

Posted - Oct 18 2022 :  18:41:26  Show Profile  Reply
Hi Peter

Perhaps, but it is not the design intention of the OnImageChange event to handle programmatic modifications to IEBitmap.

There are very few situations PixelFormat is implicitly changed. You can call ImageEnView1.ImageChange( iecsBitmap ) if you change the PixelFormat in your code.

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