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
 DIRECTLY load a TPicture in TImageEnView?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

933 Posts

Posted - Aug 06 2020 :  08:32:53  Show Profile  Reply
I use this code to load a TPicture in an TImageEnView:

ImageEnView1.IEBitmap.CopyFromTBitmap(APicture.Bitmap);
ImageEnView1.Update;


Isn't there a way to DIRECTLY load a TPicture in TImageEnView? (Without the detour over TPicture.Bitmap).

The reason is: My particular TPicture is a perfectly valid TPicture and can be used successfully as TPicture. But as soon as I try to access its BITMAP property I get an Access Violation! (Doesn't a TPicture automatically contain a Bitmap?)

xequte

38611 Posts

Posted - Aug 06 2020 :  17:27:31  Show Profile  Reply
Hi Peter

Some formats, such as meta files do not contain bitmaps. You should be able to assign the graphic as follows:

ImageEnView1.IEBitmap.Assign( APicture.Graphic );
ImageEnView1.Update();


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

xequte

38611 Posts

Posted - Aug 08 2020 :  02:06:27  Show Profile  Reply
Also, for 9.1.2 you can assign a TPicture to a TIEBitmap or TImageEnView

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

PeterPanino

933 Posts

Posted - Aug 08 2020 :  08:11:28  Show Profile  Reply
Thank you!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: