Resize pixels matrix.

Revert this change when porting to OpenGL ES, it only supports rectangular matrices.