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 : Sunday, November 27, 2005 4:31:52 PM(UTC)
Shingo Yabuki

Groups: Registered
Posts: 2


I want to add some text on the image,for example this image:

How can I do?

Shingo Yabuki attached the following image(s):
irelantis.jpg
 

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 : Monday, December 5, 2005 1:38:03 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

Hello,

What is the programming interface (COM, OCX, API, .Net, etc.) that you are using?
What is the programming language that you are using?

However, if you are using COM
programming interface with VB, you can draw text on the image by using the DrawText method (ILEADRasterFXD) as shown below follows:

+---------------------------------+
Dim LeadRasIO As New LEADRasterIO
Dim RasterFxd As New LEADRasterFXD
...
LeadRasIO.Load LEADRasterView2.Raster, "d:\lead14\dist\images\ulay1.bmp", 0, 0, 1
'Set the text properties
RasterFxd.TextTop = 50
RasterFxd.TextLeft = 50
RasterFxd.TextWidth = LEADRasterView1.DstWidth - 50
RasterFxd.TextHeight = LEADRasterView1.DstHeight - 50
RasterFxd.TextAlign = FXD_TEXTALIGN_HCENTER_VCENTER
RasterFxd.TextAngle = 450   '45 degrees
'Text highlight color and style
RasterFxd.TextHiliteColor = RGB(0, 0, 0)
RasterFxd.TextStyle = FXD_TEXTSTYLE_DROPSHADOW
'Draw the text
RasterFxd.DrawText LEADRasterView1.Raster, 0, "LEADTOOLS", LEADRasterView1.Raster.Bitmap
...
+---------------------------------+

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Tuesday, December 6, 2005 3:40:57 PM(UTC)
michael.loux

Groups: Registered
Posts: 11


Hi Maen,

How would we go about doing something like that with .NET and LEADTools Document Imaging v14? 
 
#4 Posted : Sunday, December 11, 2005 4:56:26 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

Hi Mike,

You can draw text (string) using LEADTOOLS .Net SDK by using the following code:
+-----------------------------------------+
using System.Drawing;
using System.Drawing.Drawing2D;
...
private void button2_Click(object sender, System.EventArgs e)
{
RasterImageGdiPlusGraphicsContainer container = rasterImageViewer1.Image.CreateGdiPlusGraphics();
container.Graphics.SmoothingMode = SmoothingMode.HighQuality;
Brush br = new LinearGradientBrush(Point.Empty, new Point(200, 200), Color.Red, Color.Yellow);
Font font1 = new Font(FontFamily.GenericSansSerif,12);
PointF point1 = new PointF(100,100);

container.Graphics.DrawString("LEADTOOLS",font1,br,point1);
rasterImageViewer1.Refresh();
}
+-----------------------------------------+

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
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.180 seconds.