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, December 22, 2008 4:49:11 AM(UTC)

gfjud11  
gfjud11

Groups: Registered
Posts: 3


I am getting an error of INVALID FILE FORMAT when trying to load a TIF image into the rasterimageviewer.

I downloaded the evaluation copy of LeadTools .NET 32-bit eval 16.  I am mostly interested in the funtionality of zooming in and out.  I am running WinXp, VS 2005 SP1, & Framework 2.0.50727 SP1. 

Here are the steps I did:

    1. Created a blank C# Windows Application Solution with VS 2005
    2. Right click on the toolbox and clicked on Choose Item...
    3. Added the RasterImageViewer and RasterPictureBox Controls
    4. Dragged a RasterImageViewer onto the Form
    5. Leadtools, Leadtools.Codecs, and Leadtools.WinForms were added to the Reference
    6. The code below is what I am running for this simple test
    7. The invalid format error happens when I do the codecs.load(FILENAME)

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

using Leadtools.Codecs;

namespace LeadToolTest

{

public partial class Form1 : Form

{

public Form1()

{

InitializeComponent();

}

private void Form1_Load(object sender, EventArgs e)

{

RasterCodecs.Startup();

RasterCodecs codecs = new RasterCodecs();

rasterImageViewer1.Image = codecs.Load(@"S:\VS2005Code\LeadToolTest\LeadToolTest\LeadToolTest\test.tif");

codecs.Dispose();

RasterCodecs.Shutdown();

}

}

}

 

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 22, 2008 5:43:35 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,028

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

You will also need to include the file format DLL. For example if you want to support JPG, you need to include Leadtools.Codecs.Cmp.dll. If you want to support TIFF CCITTG4 format, you need to add Leadtools.Codecs.Fax.dll and Leadtools.Codecs.Tif.dll to your project.
For more information, please check the help file 'Files To Be Included With Your Application'.
 
#3 Posted : Tuesday, December 23, 2008 4:41:06 AM(UTC)

gfjud11  
gfjud11

Groups: Registered
Posts: 3


Adding the codec for the type of image file fixed the issue.

Thanks.

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