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 : Friday, October 7, 2005 12:49:26 PM(UTC)

shahshr  
shahshr

Groups: Registered
Posts: 4


I am trying to use Leadtools to convert JBIG file to TIFF and for that I have imported LeadTools Version 14 (Unmanaged code, non-Unicode) into my C# app. The code works fine on my machine (which has lead tools installed) but on other machine it fails with an exception "Class is not licensed for use". Following is the sample code :

   LTRASTERLib.LEADRasterClass raster = new LTRASTERLib.LEADRasterClass(); 
   LTRASTERIOLib.LEADRasterIOClass  obj = new LTRASTERIOLib.LEADRasterIOClass();

   obj.Load (raster,"Test.bmp",0,1,1);
   obj.Save(raster,"Test.tiff",LTRASTERIOLib.RasterFileConstants.FILE_CCITT,1,LTRASTERIOLib.QFactorConstants.QFACTOR_PQ1,0);

I am using LTR14N.dll for LEADRasterClass and LTRIO14N.dll for LTRASTERIOLib.

I have tried copying (and registering) same files from \Redist folder (on to test machine) but get the same error.

Any ideas ?

Thanks

 

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, October 11, 2005 6:07:38 AM(UTC)

Amin  
Amin

Groups: Manager, Tech Support
Posts: 367

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

Our Raster COM object is licensed. This means to create it dynamically, you need to supply the license string to it. You can do that as follows:

const String strLic = "LEADTOOLS OCX Copyright (c) 1991-2002 LEAD Technologies, Inc.";
LTRASTERLib.LEADRasterFactoryClass FactoryObj = new LTRASTERLib.LEADRasterFactoryClass();
LTRASTERLib.LEADRasterClass raster = (LTRASTERLib.LEADRasterClass)FactoryObj.CreateObject("LEADRaster.LEADRaster.140", strLic);
LTRASTERIOLib.LEADRasterIOClass obj = new LTRASTERIOLib.LEADRasterIOClass();

Edited by user Tuesday, December 6, 2016 1:39:53 PM(UTC)  | Reason: Not specified

Amin Dodin

Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#3 Posted : Tuesday, October 11, 2005 9:03:20 AM(UTC)

shahshr  
shahshr

Groups: Registered
Posts: 4


Thank you,

After crossing first hurdle, I am stumbling upon another one. I am tring to load a JBIG file using following code.

 raster.UnlockSupport(LTRASTERLib.RasterSupportLockConstants.L_SUPPORT_MEDICAL , "Unlock key supplied by Leadtools");

raster.UnlockSupport(LTRASTERLib.RasterSupportLockConstants.L_SUPPORT_LTPRO ,"Unlock Key supplied by Leadtools");

obj.Load (raster,"Test.jbg",0,1,1);

This code works fine, again for a machine where Lead Tools are installed but fails on other. It fails only for Colored images ( success for greyscale).

I have inclued lfjbg14s.dll with my app for JBIG support, what else do I need to include ?

Thanks

 
#4 Posted : Saturday, October 15, 2005 11:22:00 PM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,022

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

What error code do you get when loading color JBIG files?  Try including LTCLR14s.dll with on the test machine.

Bashar Abdulqaiyume
LEAD Technologies, Inc.
 
#5 Posted : Thursday, October 20, 2005 12:08:02 PM(UTC)

shahshr  
shahshr

Groups: Registered
Posts: 4


I was busy with something else for a last few days so couldn't reply. The problem was incorrect input (the test.jbg file), after looking that file through sample app from LeadTools, I figured out that it was an incorrect file.

Everything works good now.

Thanks your help.

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