Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Friday, September 30, 2005 10:11:18 AM(UTC)
basilisk

Groups: Registered
Posts: 2


I'm using the latest version of your .NET tools.

I have an existing TIFF file and I want to draw some text on it and save it.  How do I do this?

TIA

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Sunday, October 2, 2005 4:05:01 PM(UTC)

Amin  
Amin

Groups: Manager, Tech Support
Posts: 367

Was thanked: 1 time(s) in 1 post(s)

After loading the image, you can use the CreateLeadDC method to get a
device context that can be used with Windows GDI methods to draw lines,
text, or images on the image.

You can also use the CreateGdiPlusGraphics method to create a GDI+ Graphics object for drawing.

Both methods have examples in the .NET 14 help file, which you can modify to draw text.

Edited by user Tuesday, December 6, 2016 1:33:27 PM(UTC)  | Reason: Not specified

Amin Dodin

Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#3 Posted : Monday, October 3, 2005 6:49:19 AM(UTC)
basilisk

Groups: Registered
Posts: 2


I'm using C#.  Are both of the methods you descibed here available to me in this language?

Using the CreateGdiplusGraphics when processing 1000's of images slows everything down quite a bit.  Is this to be expected?

TIA

 
#4 Posted : Tuesday, October 4, 2005 3:51:29 AM(UTC)

Amin  
Amin

Groups: Manager, Tech Support
Posts: 367

Was thanked: 1 time(s) in 1 post(s)

Yes they are both available to C# programmers.

Both CreateLeadDC and CreateGdiPlusGraphics methods are part of the
RasterImage class and each of them has a C# example in the help file.

There could be a performance hit when using these functions with large
image dimensions (width and height). If that is the case, you can work
around it by writing the text on a smaller blank image (e.g. filled with white color), then using the
CombineFastCommand class to move the text to the larger image.

Edited by user Tuesday, December 6, 2016 1:34:06 PM(UTC)  | Reason: Not specified

Amin Dodin

Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#5 Posted : Wednesday, July 25, 2007 8:07:30 AM(UTC)
cjcervantes

Groups: Registered
Posts: 2


If you found a way of doing this, could you please post how you did it? If you have some code, it would be very helpful. I'm new on this and I would really appreciate it.

Thanks!
 
#6 Posted : Thursday, July 26, 2007 10:52:12 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


The solution is as Amin said.  You must use GDI+ functions to draw the text on the image.  To get a GDI+ Graphics object, you must call the RasterImage.CreateGdiPlusGraphics method.  For an example on converting to and from GDI+ images, see the LEADTOOLS .NET help file regarding the CreateGdiPlusGraphics method.  For code on drawing the text, check MSDN.

 

If you have a Document level or higher toolkit, you can use the LEADTOOLS annotation libraries to add text to the image.  For an example, see the LEADTOOLS .NET help file article regarding non-automated annotations.

 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.074 seconds.