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 : Thursday, July 5, 2007 9:58:38 AM(UTC)
xtreme109

Groups: Registered
Posts: 2


Can anyone tell me what Iam doing wrong. I have version 14.5 of the imaging raster pro for .net.

RasterCodecs codecs = new RasterCodecs();

codecs.Options.Txt.Load.TopMargin = 1.5;
codecs.Options.Txt.Load.BottomMargin = 1.5;
codecs.Options.Txt.Load.LeftMargin = 1;
codecs.Options.Txt.Load.RightMargin = 1;
codecs.Options.Txt.Load.FontColor = new RasterColor(255, 0, 0);
codecs.Options.Txt.Load.FontSize = 12;
codecs.Options.Txt.Load.Bold = true;

IRasterImage tempImg = codecs.Load("c:\\test.txt");//fails here

codecs.Save(tempImg,"c:\\test.tiff",RasterImageFormat.Tif, 24);
 

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 : Thursday, July 5, 2007 10:00:54 AM(UTC)
xtreme109

Groups: Registered
Posts: 2


in addition i have reference leadtools.codecs.txt.dll as well as leadtools.codecs.rtf.dll
 
#3 Posted : Sunday, July 8, 2007 9:44:53 PM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

Hello,

Before loading Text files using LEADTOOLS .Net, you need to set the codecs2.Options.Txt.Load.Enabled property to True as follows:
--------------------------------
Dim codecs2 As RasterCodecs
RasterCodecs.CodecsPath = "D:\Program Files\LEAD Technologies, Inc\LEADTOOLS 14.5\Redist\Dotnet\v11"
codecs2 = New RasterCodecs

codecs2.Options.Txt.Load.Enabled = True ' Enable loading Text files

codecs2.Options.Txt.Load.TopMargin = 1.5
codecs2.Options.Txt.Load.BottomMargin = 1.5
codecs2.Options.Txt.Load.LeftMargin = 1
codecs2.Options.Txt.Load.RightMargin = 1
codecs2.Options.Txt.Load.FontColor = New RasterColor(255, 0, 0)
codecs2.Options.Txt.Load.FontSize = 12
codecs2.Options.Txt.Load.Bold = True

Dim tempImg As IRasterImage
tempImg = codecs2.Load("c:\test.txt")

codecs2.Save(tempImg, "c:\\test.tiff", RasterImageFormat.Tif, 24)
--------------------------------

Please let me know if this helps.

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.060 seconds.