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 : Thursday, October 13, 2016 7:53:44 AM(UTC)
Karim Kai

Groups: Registered
Posts: 4


I am simply trying to load an image using the Java API for Windows, but i always get the exception: leadtools.RasterException: User has aborted operation.

I try something like this:

codecs = new RasterCodecs();
RasterImage image = codecs.load(filePath,0, CodecsLoadByteOrder.BGR,1,1);

Whereas the filePath is a simple String representing the path to my file. My problem is, that i don't fully understand what the exception is and how to fix it.

Thanks in advance.

EDIT: I just forgot to set the license. Thanks to Nick from tech support!
 

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 : Thursday, October 13, 2016 9:57:04 AM(UTC)

Nick  
Nick

Groups: Registered, Tech Support, Administrators
Posts: 161

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

Glad I was able to assist you with this error in chat, Karim. Here's how to set license in code to resolve the issue.

It will be necessary to call RasterSupport.SetLicense() prior to making any calls which use LEADTOOLS components.

https://www.leadtools.co...rsupport~setlicense.html

Here is sample code on how to call it in a Java Application:

Code:
   public static boolean setLicense() {
      /* TODO: Change this to use your license file and developer key */ 
      String licenseFile = "Replace this with the path to the LEADTOOLS license file";
      String developerKey = "Replace this with your developer key";

      try {
         leadtools.RasterSupport.setLicense(licenseFile,developerKey);
      } catch (Exception e) {
         System.out.println(e.getMessage());
         return false;
      }

      return !leadtools.RasterSupport.getKernelExpired();
   }


For an example on how to do this in code for the other support languages, see this post on our forums:
https://www.leadtools.co...untime-License#post41429

Edited by user Friday, October 14, 2016 8:01:00 AM(UTC)  | Reason: Not specified

Nick Crook
Developer Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
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.087 seconds.