Think I may have found the problem with the image. Say I have a 320x200 image. I would code my app to red pixels 0-319. Now when I store the bitmap's dimensions in the bitmap headers, should I store 319 or 320 for the width? Subtracting one from the width seems to fix the problem in some cases.