Out of bounds error in set_pixel
ctralie opened this issue · 3 comments
Hello!
Thank you for this great example! It saved me a lot of time when I was trying to get a simple dependency-free image writer in a class on C++
My students and I did notice a little bug, though. It appears there is an out of bounds error on the line below in set_pixel if either x0 or y0 is exactly equal to the width or height, respectively
Line 197 in 04427f2
Otherwise, it seems to work quite well.
Also, I know this wasn't a super serious library and was mainly added for educational reasons, but I added some functionality here on drawing circles, lines, and characters:
https://github.com/Ursinus-CS174-F2020/Week14_BinarySearchTrees/blob/main/BMP.h
Best,
Chris Tralie
Hey @ctralie, perhaps you might want to submit your fix as a pull request? It would probably make it easier for the maintainer to incorporate.