fix set pixels bug due to transpose