Here is the entirety of my code:
#include "CImg.h"
#include <iostream>
using namespace cimg_library;
int main() {
CImg<float> image(100,100,1,3,0);
const float color[] = {1.0,1.0,0.0};
image.draw_point(50,50,color);
image.save("file.bmp");
CImgDisplay local(image, "Hah");
while (true) {
local.wait();
}
}
This successfully displays what I expect in a window, namely, a completely black square with a white pixel at 50,50. However, file.bmp is simply a black square, without that pixel (and saving a cimg Image that has been modified with repeated calls to draw_point in a larger program that does something useful also fails). What's going on here?