It seems like this would be very easy, but I am having a lot of problems using the draw_image() function in CImg. Here is a snippet of code:
CImg<unsigned char> landingScreen("desertSunset.bmp"), newGameBTN("newgame.pgm");
CImgDisplay main_disp(landingScreen,"Main Window");
landingScreen.draw_image(400,400,newGameBTN);
I have tried about 8 of the overloaded functions for draw_image(), all to no avail. When I run the program, Main Window pops up with my desertSunset image, but that's it. I am trying to lay newgame.pgm on top of landingScreen, but the image doesn't show up. Is this a problem with depth, or maybe the way I'm structuring the file? I've looked through a bunch of different example files for CImg but they aren't very helpful, and the documentation on these functions is minimal at best. If someone could give a 'Hello World' example of how to draw an image over an image, or tell me what I'm doing wrong, I would greatly appreciate it. Thanks!