This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Thursday, August 24, 2006 5:23:45 AM(UTC)
Groups: Registered
Posts: 2
I'm getting an invalid file format error with normal .TIF files. When viewing the files in IE, they display with no errors.
I've updated to the latest patch release for 14.5.
The code:
Dim imageInfo As CodecsImageInfo
Try
fileName =
Me.Tag
codecs =
New RasterCodecs
imageInfo = codecs.GetInformation(fileName,
True)
imageBuf = codecs.Load(fileName, 0, CodecsLoadByteOrder.BgrOrGray, 1, imageInfo.TotalPages)
imgScan.Image = imageBuf
lblInfo.Text =
"There are " & Convert.ToString(imageInfo.TotalPages) & " pages available to view."
imageLoaded =
True
Catch ex As Exception
MsgBox(ex.ToString)
End Try
The exception is thrown on the codecs.GetInformation() line.
I'm using ClickOnce deployment for this application, however it fails in the same manner if I install the application "normally" as well.
This one is a show stopper for me and I need to get it resolved as quickly as possible.
Thanks.
Gene Buckle
Sr.Programmer/Analyst, CertainTeed Corp.
#2
Posted
:
Friday, August 25, 2006 8:11:53 AM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 764
Invalid File Format errors are thrown either because the file format is actually invalid or if the filter DLL cannot be found. If the image loads properly in the LEADTOOLS precompiled demo applications, then it is likely because you have not deployed the proper filter DLL or you have not properly set the RasterCodecs.CodecsPath to the directory where your filter DLLs are located.
Try calling RasterCodecs.CodecsPath = "your filter DLL directory" before you create a new instance of your RasterCodecs class. Your best bet it is to set the CodecsPath property in your Form_Load event.
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.