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
 IEvolution ImageList Image Emboss/Annotation

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
brandonbrown Posted - Jan 26 2021 : 16:38:19
Pardon the interruption for which might be a stupid question or method for what I am try to do. I *think* I almost have it, however I could use a little help, especially if there is a better way to do this.

Essentially I just want to write a text string on an image within an image list. I can do the entire thing, but then I have to save it to a file to reload it into the imagelist. There's got to be a better way, so I was doing it with the Microsoft Drawing library. Here's the code snippet:


Dim img As New HiComponents.IEvolution.IEImage

img = multiScan.ImageList.GetImage(0)



'multiScan.ImageList.CopyTo(multiScan.ImageList.ImageCount - 1, img)
Dim original As System.Drawing.Bitmap = img.CreateBitmap()
Dim newImage = New Bitmap(img.Width, img.Height)

Dim gr = Graphics.FromImage(newImage)
Dim pnt As New Rectangle

'Dim fnt As New Font("Free 3 of 9", 48, FontStyle.Regular)
Dim fnt As New Font("Courier New", 48, FontStyle.Regular)
gr.DrawImage(original, 0, 0)

gr.DrawString("2021012099998888", fnt, Brushes.Black, New RectangleF(20, 20, 1000, 100))

newImage.Save("C:\tmp\goodie.bmp")

I can save the bitmap as a BMP and load it back. My question is, how can I take the bitmap and load it back into the imagelist with the embossed/annotated image? Everything I've tried so far causes an exception.

Thanks in advance!


~brandon
5   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jan 27 2021 : 15:52:49


Nigel
Xequte Software
www.imageen.com
brandonbrown Posted - Jan 27 2021 : 13:52:05
Good to know and thank you for the quick response. I'll just leave in what I have. Thanks again for a quality product!
xequte Posted - Jan 27 2021 : 13:50:24
Hi

I don't think there is a more efficient way to draw text than you are using.

You could also use a text layer and merge it into the image, but it would be inefficient for this task:

https://www.imageen.com/ievolutionhelp/html/59dcfb3a-75e4-7c46-728d-5c89fb20ba57.htm

Nigel
Xequte Software
www.imageen.com
brandonbrown Posted - Jan 27 2021 : 08:24:22
Nigel, thank you for giving me that piece of info, the app would have crashed if I hadn't done the release.

Did you understand what I am trying to do? Put text (annotate) the image with a specific string that would be saved in on the TIFF bitmap.

I am having to call the Windows Drawing library, then save the bitmap as a file, load it back into IEvolution Imagelist. This seems like NOT the way to do it. Is there an easier way to do that all inside of IEvolution. I just really want to put at time/date stamp on an multipage TIFF and save it. I think I'm close, I just had to use the Windows framework. Is there another thread that references that?

Thanks in advance, this project is almost done!
xequte Posted - Jan 27 2021 : 01:54:53
Hi Brandon

You should call ReleaseImage after your changes:

https://www.imageen.com/ievolutionhelp/html/38fff9a0-2838-fb32-2a9a-d9f7e35023a8.htm

Enabling the saveChanges parameter.

You should then call multiScan.ImageList.UpdateImages or multiScan.Update

Nigel
Xequte Software
www.imageen.com