How to get line count from ofPixels::Lines?

If I get some ofPixels::Lines from an ofPixels object, how can I get the line count?

ofPixels & pix = image.getPixels();
ofPixels::Lines lines = pix.getLines();

Hi,
Maybe this way?

    ofPixels p;
    p.allocate(100, 100, 4);
    ofPixels::Lines lines = p.getLines();
    cout << lines.end().getLineNum() << endl;

the line count is the height of the image so getHeight() is the line count

1 Like