Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

Re: 16 bits tiff images loading
Started by daanzhu at 06-24-2008 11:22. Topic has 6 replies.

Print Search « Previous Thread Next Thread »
  06-24-2008, 11:22
daanzhu is not online. Last active: 6/24/2008 9:50:32 PM daanzhu

Not Ranked
Joined on 06-24-2008
Posts 4
16 bits tiff images loading
Reply Quote
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
   Report 
  06-24-2008, 13:30
daanzhu is not online. Last active: 6/24/2008 9:50:32 PM daanzhu

Not Ranked
Joined on 06-24-2008
Posts 4
Re: 16 bits tiff images loading
Reply Quote
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.


   Report 
  06-24-2008, 17:31
GregR is not online. Last active: 11/17/2008 11:10:19 AM GregR



Top 10 Posts
Joined on 05-31-2006
In House
Posts 1,706
Re: 16 bits tiff images loading
Reply Quote
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.

Greg Ross
LEADTOOLS Technical Support
   Report 
  06-25-2008, 3:56
daanzhu is not online. Last active: 6/24/2008 9:50:32 PM daanzhu

Not Ranked
Joined on 06-24-2008
Posts 4
Re: 16 bits tiff images loading
Reply Quote
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.

   Report 
  06-25-2008, 9:09
GregR is not online. Last active: 11/17/2008 11:10:19 AM GregR



Top 10 Posts
Joined on 05-31-2006
In House
Posts 1,706
Re: 16 bits tiff images loading
Reply Quote
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.

Greg Ross
LEADTOOLS Technical Support
   Report 
  06-25-2008, 11:53
daanzhu is not online. Last active: 6/24/2008 9:50:32 PM daanzhu

Not Ranked
Joined on 06-24-2008
Posts 4
Re: 16 bits tiff images loading
Reply Quote
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.
   Report 
  06-25-2008, 12:03
GregR is not online. Last active: 11/17/2008 11:10:19 AM GregR



Top 10 Posts
Joined on 05-31-2006
In House
Posts 1,706
Re: 16 bits tiff images loading
Reply Quote
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.

Greg Ross
LEADTOOLS Technical Support
   Report 
Post
LEAD Support Fo... » General » Example Request... » Re: 16 bits tiff images loading

Powered by Community Server, by Telligent Systems