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 : Monday, June 18, 2007 9:23:16 AM(UTC)

data  
data

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

 

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 : Tuesday, June 19, 2007 5:55:33 AM(UTC)

Adnan Ismail  
Guest

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.

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