Upvote:2

Aprove answer
                  bytesPerRow: 2 * width,

Credit Goes to: stackoverflow.com

Related question with same questions but different answers