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 : Tuesday, June 24, 2008 6:17:25 AM(UTC)

daanzhu  
daanzhu

Groups: Registered
Posts: 4


I had a problems to load a 16 bits tif image using leadtools.
Below is my code

IRasterImage image = rasterCodecs.Load(filename, 0, CodecsLoadByteOrder.BgrOrGrayorRomm, firstPage, lastPage);

The return value rasterImage.BitsPerPixel
for loading a RGB and 8 bit image are correct, the return values are 24 and 8. Unfortunately for a 16 bits images the return value are 8 as well. It seem rasterCodecs chop off high 8 bits data which is wrong. Thank you for your advice.

Dan
 

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 24, 2008 8:25:24 AM(UTC)

daanzhu  
daanzhu

Groups: Registered
Posts: 4


In order to identify the problems, I would like to add some more information:
If I would like to get a pixel intensity,
byte[] values = rasterImage.GetPixelData(y, x);

If rasterImage is a 8 bit image, the return value is correct for example value[0]=0x7A
If rasterImage is a RGB image, the return values are correct
values[0]=0x10 (blue channel)
values[1]=0x8F (green channel)
values[2]=0xEA (red channel)

Unfortunately if the image is an 16 tif image, the return value is
value[0]=0x7A actually the pixel intensity is 0x7A94. It seems only high low part byte was chop off!!

Any people may tell me how to sort out this problem. Thank you.

 
#3 Posted : Tuesday, June 24, 2008 12:26:26 PM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


What is the file version of Leadtools.dll that you are using?

What happens if you specifically pass 16bpp in the Load function?

Are you unlocking support for Document?  Keep in mind that loading and using 16bpp images is a Document or higher functionality and you must unlock support for it.  If you need the unlock keys, please contact sales@leadtools.com in order to get them.

If you are evaluating, then you should not have to unlock anything.
 
#4 Posted : Tuesday, June 24, 2008 10:51:21 PM(UTC)

daanzhu  
daanzhu

Groups: Registered
Posts: 4


The version of Leadtools.dll is 14.5.0.71

If I specially pass 16bpp for example:
RasterImage image = rasterCodecs.Load(filename, 16, CodecsLoadByteOrder.BgrOrGray, firstPage, lastPage);

There is an exception RasterException: Extended grayscale support is required".

Maybe this exception reflects to the unlock key.
 
#5 Posted : Wednesday, June 25, 2008 4:04:45 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


Exactly.  You will need to unlock support for Document.  If you do not have this key, please contact sales (phone: 704-332-5532 or email: sales@leadtools.com) in order to get the key.
 
#6 Posted : Wednesday, June 25, 2008 6:48:42 AM(UTC)

daanzhu  
daanzhu

Groups: Registered
Posts: 4


I already sent an email to you. Could you please advise me how to use the unlock key?

Thank you very much & looking forward to hearing from you.
 
#7 Posted : Wednesday, June 25, 2008 6:58:44 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


Since unlock keys are private information, instructions like that cannot be shared on the public forums.  I found your email and we will continue via that medium.
 
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.156 seconds.