fix output for pictures where width is no multiple of 32