Read pixel data from 10 bit tiff


I’m trying to read the pixel data from a 10 bit TIFF file. I have been loading it into an ofShortPixels instance. However, when I try to get the value of any color, it just spits out zero for R, G, and B values. This happens regardless of whether I use ofShortPixels, ofPixels, or ofFloatPixels. Am I doing something wrong, or is this an issue of file formatting? (usedColors is an unordered_map of ofVec3f values for which I created a custom hash)

pathToImage = imgPath;
pixels.allocate(imgWidth, imgHeight, OF_PIXELS_RGB);
ofLoadImage(pixels, pathToImage);

for (int p = 0; p < pixels.size(); p++) {
    ofShortColor pixColor = pixels.getColor(p);
    ofVec3f convertedColor(pixColor.r, pixColor.g, pixColor.b);