This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Monday, June 18, 2007 9:23:16 AM(UTC)
Groups: Registered
Posts: 1
Hello,
I want to convert a jpg to a tif file with LEADTOOLS 15.
When I use the following code a get an exception:
Message="Feature not supported"
bei Leadtools.RasterException.CheckErrorCode(Int32 code)
bei Leadtools.Codecs.RasterCodecs.SaveOnePage(Int32 page, SaveParams saveParams)
bei Leadtools.Codecs.RasterCodecs.DoSave(SaveParams saveParams)
bei Leadtools.Codecs.RasterCodecs.Save(RasterImage image, String fileName, RasterImageFormat format, Int32 bitsPerPixel)
How can I create a tif file from a jpg file without errors?
Code:
Imports System
Imports System.Windows
Imports System.Windows.Forms
Imports Leadtools
Imports Leadtools.Codecs
Public Class Form1
Private codecs As RasterCodecs
Private image As RasterImage
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
RasterCodecs.Startup()
codecs = New RasterCodecs
Dim Filename As String = "C:\hello.jpg"
image = New RasterImage(System.Drawing.Image.FromFile(Filename))
Dim NewFilename As String = "C:\hello.tif"
codecs.Save(image, NewFilename, Leadtools.RasterImageFormat.CcittGroup4, 1)
End Sub
End Class
#2
Posted
:
Tuesday, June 19, 2007 5:55:33 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
In most cases, the reason for this error is the absence of
LEADTOOLS codec DLL files, such as "Leadtools.Codecs.Cmp.dll" needed
for loading and saving CMP and JPEG files. Also, Leadtools.Codecs.Tif.dll and Leadtools.Codecs.Fax.dll
are needed for loading and saving Tiff image files.
The needed codecs must be in the application path.
Adding them to the references ensures they're copied
to the EXE's folder.
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.