I had the same problem with my Nikon D90. Occasionally a Jpeg file would turn out like yours.

The solution was to buy a new sd card.