DavidBuchanan314 / parallel-png-proposal

MIT License
80 stars 0 forks source link

ceil vs. floor #2

Closed richgel999 closed 2 years ago

richgel999 commented 2 years ago

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).

DavidBuchanan314 commented 2 years ago

Fixed in e0130c3b3cd0a43bb3fd8032342df63086d1abe4