C/C++ tifflib: Need to read location data of white and black pixels from BW TIFF files
===

I am fairly new to image processing using Visual C++, I am in search of a way that reads black and white TIFF files and writes the image as an array hex values representing 0 or 1, then get the location information of either 0 (black) or 1 (white). 

After a bit of research on Google and an article here https://www.ibm.com/developerworks/linux/library/l-libtiff/#resources I have the following trivial questions, please do point me to relevant articles, there are sooooo many that I couldn’t wrap my heads around them, meanwhile I will keep on searching and reading....

*Is it possible to extract pixel location information from TIFF using tifflib? *

Again being new to all image formats, I couldn't help to think that an image is made up of a 2D array of hex values , is the bitmap format more appropriate? Thinking in that way makes me wonder if I can just write the location of “white” or “black” mapped from its height onto a 2D array. I want the location of either “black” or “white”, is that possible? I don’t really want an array of 0s and 1s that represents the image, not sure if I even need them.

TIFF Example of a 4 by 2 BW image:

 - black  white
 - white  black
 - black  black
 - white  white

Output to something like ptLocArray[imageHeight][imageWidth] under a function named mappingNonPrint()

 - 2 1
 - 4 4

or under a function named mappingPrint()

 - 1 2
 - 3 3

*With tifflib, in what direction/ways does it read TIFF files?*

Ideally I would like TIFF file to be read vertically from top to bottom, then shifts to the next column, then start again from top to bottom. But my gut tells me that's a fairy tale, being very new to image processing, I like to know how TIFF is read for example a single strip ones.

THANKS A TON. Any help is appreciated

