also i have tried it like u described.
my pics are 16bit bmp files.
int Draw::saveImg(const unsigned int* img)
std::cout << "Draw::saveImg()" << std::endl;
m_img = img;
memset(&my, 0, sizeof(PhImage_t));
my.image = (char*) m_img;
my.type = 33;
my.size.h = 240;
my.size.w = 320;
my.alpha = 0;
my.bpl = 5120;
my.colors = 0;
if((error = PxWriteImage("/home/write.bmp", &my, NULL ,PX_IMAGE_BMP,0)) == 1)
perror("ERROR in PxWriteImage");
std::cout << "finished()" << std::endl;
but i get the same error. “Memory fault (core dumped)”.
it creates a file, but the filesize is 0 bytes and i cant open it
okay now it works
it was a little mistake ^^
but now i have the problem that the bmp picture has no color even when i set “my.color = 32768”.