pyvista.Texture.to_array#
- Texture.to_array() NumpyArray[float][ソース]#
テクスチャーを配列で返します.
- 戻り値:
numpy.ndarrayテクスチャをnumpy配列にしたもの.
備考
この配列の最初の2次元の形状が入れ替わります.例えば,
(300, 200)の画像は(200, 300)の配列を返します.例
>>> from pyvista import examples >>> texture = examples.download_puppy_texture() >>> texture Texture (...) Components: 3 Cube Map: False Dimensions: 1600, 1200 >>> texture.to_array().shape (1200, 1600, 3) >>> texture.to_array().dtype dtype('uint8')