Author |
Topic |
|
brandonbrown
USA
37 Posts |
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 |
|
xequte
38613 Posts |
|
brandonbrown
USA
37 Posts |
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
38613 Posts |
|
brandonbrown
USA
37 Posts |
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
38613 Posts |
|
|
Topic |
|
|
|