12 bit grayscale Tiff

Discussions about image processing and document imaging.
Post Reply
Posts: 10
Joined: Sat Apr 19, 2008 1:50 am

12 bit grayscale Tiff

Post by anasrallah » Sat Apr 19, 2008 2:14 am

I'm trying to read and process a 12 bit grayscalre tiff image with gdpicture pro in vb.
I am able to display it on the screen and load it to an 2D array of ARGB longs using GetPixelArray2D but I don't need RGB data I need the 12 bit data (long) 2D array.
How can I achieve this?

User avatar
Site Admin
Posts: 5699
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: 12 bit grayscale Tiff

Post by Loïc » Tue Apr 22, 2008 10:48 am

Hi anasrallah,

First, 12 bit long data doesn't exist in any language.

Second, it is very hard to get array of pixel in 12bpp image. GdPicture provides many functions to handle these pixel within array of ARGB color. In 99% of cases, it is the best way to perform read & write operation within pixel data of any color depth image.

If you want to build your own pixel access function you need to use the low-level GetImageBits() method which returns a pointer to the data-bits of the bitmap:

http://guides.gdpicture.com/v5/gdpictur ... eBits.html

Note: This method is available since GdPicture V 5.2

Best regards,

Loïc Carrère

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests