A decoder should be able to determine the number of such pieces by calculating floor(image_height / piece_height). Each piece is stored in its own IDAT chunk.
Shouldn't this be ceil(image_image/piece_height)? If the image_height is 17 and the piece_height is 8, I would expect this to be 3 (not 2).
Shouldn't this be ceil(image_image/piece_height)? If the image_height is 17 and the piece_height is 8, I would expect this to be 3 (not 2).