ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TImageEnMView, layers, and ioIEN

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
JonMRobertson Posted - Aug 14 2023 : 23:41:21
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.
2   L A T E S T    R E P L I E S    (Newest First)
JonMRobertson Posted - Aug 16 2023 : 19:03:09
Thanks Nigel. That is much easier than the solution I was going to implement tomorrow. :)

Jon
xequte Posted - Aug 16 2023 : 18:58:58
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