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
 TImageEnMView, layers, and ioIEN
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

JonMRobertson

USA
32 Posts

Posted - Aug 14 2023 :  23:41:21  Show Profile  Reply
I am creating an image acquisition form that has a TImageEnMView and a TImageEnView. The EnView is attached to the EnMView via AttachedImageEnView.

I can add layers to any page of a scanned document and save that page out as an ioIEN file using TImageEnView.IO.SaveToFile. I can load that file into TImageEnMView and the layers are retrieved. They are shown in the thumbnail and in the attached TImageEnView.

There are two things that I would like to do but have not found a way to accomplish. I searched Help, Demos, and Forum. And dug into the source a little. But I would prefer to avoid copying low-level code.

1. As layers are added in TImageEnView, update the associated frame (SelectedImage) in TImageEnMView with the layers.

2. Iterate through the images loaded in TImageEnMView and save each image as a ioIEN file. I attempted to do this using TImageEnMView.GetImageToStream. That throws EIEException with message 'Must be attached to a TImageEnView to save in IEN format'. How can I save a frame of a TImageEnMView to a stream in ioIEN format?

Thank you for any guidance.

xequte

38615 Posts

Posted - Aug 16 2023 :  18:58:58  Show Profile  Reply
Hi Jon

1. On the ImageChange event of the TImageEnView you need to update the thumbnail of the TImageEnMView.

bmp := TIEBitmap.Create();
ImageEnView1.LayersDrawTo( bmp );
ImageEnMView1.SetImage( idx, bmp );
bmp.Free();

http://www.imageen.com/help/TImageEnView.LayersDrawTo.html
http://www.imageen.com/help/TImageEnMView.SetImage.html

2. TImageEnMView does not support layers, it only shows a flattened view of an IEN files (e.g. a bitmap), so it cannot/should not save IEN files


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

JonMRobertson

USA
32 Posts

Posted - Aug 16 2023 :  19:03:09  Show Profile  Reply
Thanks Nigel. That is much easier than the solution I was going to implement tomorrow. :)

Jon
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: