Hi, I figured out what the problem was. Increase the height of the image by 1 and fill the bottom row of pixels with the background color(because the background is the lower left pixel, it is the color of this pixel that is cut out of the image)
Oh that makes so much sense! Thank you so much for the help! :D