refactory: canvas stride should in bytes rather than in pix.