<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>For anyone whom may stumble over this in the future, the issue was that when I was saving out my .pgm files, I was opening the file with:</div><div><br></div><div>f = fopen(filename, "w"); <br>and not </div><div>f = fopen(filename, "wb");<br></div><div><br></div><div>I will look into submitting an update to the example code if possible/needed.</div><div><br></div><div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div>Chris Bennett</div></div></div></div></div></div></div></div></div></div></div></div></div>