This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Friday, October 7, 2005 12:49:26 PM(UTC)
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
#2
Posted
:
Tuesday, October 11, 2005 6:07:38 AM(UTC)
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.
#3
Posted
:
Tuesday, October 11, 2005 9:03:20 AM(UTC)
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)
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)
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.