Fix image output if width != stride.