I am trying to add a picture to my xlib program, any idea how to do that and what formats are supported?
Code:
Display *display;
Window root_win=RootWindow(display,DefaultScreen(display));
Pixmap my_bmp;
int xh_bmp,yh_bmp;
unsigned int w_bmp,h_bmp;
if(XReadBitmapFile(display,root_win,"f1.xbm",&w_bmp,&h_bmp,&my_bmp,&xh_bmp,&yh_bmp)!=BitmapSuccess){
fprintf(stderr,"Failed to read bitmap file\n");
exit(0);
}
This code always displays "Failed to read bitmap file"