ToruNiina / pnm

pbm, pgm, ppm image IO for modern C++ (single header only library)

Home Page:https://app.gitbook.com/@niina-toru/s/pnm/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug in read_pbm_binary

pierre-dejoue opened this issue · comments

Hi there!

Great job on the library ! I've started using it on my project picross-solver. I noticed two issues which I fixed on my fork of pnm:

  • missing include <cctype> needed for std::isspace (I saw it compiling with MSVC)
  • issue in read_pbm_binary when the image's width is a multiple of 8

I loaded a 56x39 pbm image. The width happens to be a multiple of 8. In that case pnm++ reads one extra byte per line in the image.

Let me know if you'd like a pull request for those patches, or if you prefer to patch those yourself. They are trivial anyway!

Thank you for reporting the issue!
Pull requests are always welcome. If it is okay with you, could you send the pull request?

Merged. Thank you again!