pybullet: fix Windows numpy build
This commit is contained in:
@@ -5997,12 +5997,12 @@ static PyObject* pybullet_getCameraImage(PyObject* self, PyObject* args, PyObjec
|
|||||||
PyObject* pySeg;
|
PyObject* pySeg;
|
||||||
|
|
||||||
int i, j, p;
|
int i, j, p;
|
||||||
|
int bytesPerPixel = 4; // Red, Green, Blue, and Alpha each 8 bit values
|
||||||
|
|
||||||
|
|
||||||
b3GetCameraImageData(sm, &imageData);
|
b3GetCameraImageData(sm, &imageData);
|
||||||
// TODO(hellojas): error handling if image size is 0
|
// TODO(hellojas): error handling if image size is 0
|
||||||
|
|
||||||
int bytesPerPixel = 4; // Red, Green, Blue, and Alpha each 8 bit values
|
|
||||||
|
|
||||||
npy_intp rgb_dims[3] = {imageData.m_pixelHeight, imageData.m_pixelWidth,
|
npy_intp rgb_dims[3] = {imageData.m_pixelHeight, imageData.m_pixelWidth,
|
||||||
bytesPerPixel};
|
bytesPerPixel};
|
||||||
npy_intp dep_dims[2] = {imageData.m_pixelHeight, imageData.m_pixelWidth};
|
npy_intp dep_dims[2] = {imageData.m_pixelHeight, imageData.m_pixelWidth};
|
||||||
@@ -6427,6 +6427,7 @@ static PyObject* pybullet_renderImageObsolete(PyObject* self, PyObject* args)
|
|||||||
PyObject* pySeg;
|
PyObject* pySeg;
|
||||||
|
|
||||||
int i, j, p;
|
int i, j, p;
|
||||||
|
int bytesPerPixel = 4; // Red, Green, Blue, and Alpha each 8 bit values
|
||||||
|
|
||||||
b3GetCameraImageData(sm, &imageData);
|
b3GetCameraImageData(sm, &imageData);
|
||||||
// TODO(hellojas): error handling if image size is 0
|
// TODO(hellojas): error handling if image size is 0
|
||||||
@@ -6434,8 +6435,6 @@ static PyObject* pybullet_renderImageObsolete(PyObject* self, PyObject* args)
|
|||||||
PyTuple_SetItem(pyResultList, 0, PyInt_FromLong(imageData.m_pixelWidth));
|
PyTuple_SetItem(pyResultList, 0, PyInt_FromLong(imageData.m_pixelWidth));
|
||||||
PyTuple_SetItem(pyResultList, 1, PyInt_FromLong(imageData.m_pixelHeight));
|
PyTuple_SetItem(pyResultList, 1, PyInt_FromLong(imageData.m_pixelHeight));
|
||||||
|
|
||||||
int bytesPerPixel = 4; // Red, Green, Blue, and Alpha each 8 bit values
|
|
||||||
|
|
||||||
npy_intp rgb_dims[3] = {imageData.m_pixelHeight, imageData.m_pixelWidth,
|
npy_intp rgb_dims[3] = {imageData.m_pixelHeight, imageData.m_pixelWidth,
|
||||||
bytesPerPixel};
|
bytesPerPixel};
|
||||||
npy_intp dep_dims[2] = {imageData.m_pixelHeight, imageData.m_pixelWidth};
|
npy_intp dep_dims[2] = {imageData.m_pixelHeight, imageData.m_pixelWidth};
|
||||||
|
|||||||
Reference in New Issue
Block a user