That normally wouldn't be a problem, except that his scans are 14650x14650 big. I'm running into a problem with SDL when I'm trying to save the resulting cropped image as a bmp. I've tried two methods with differing results.
If I load the image into a surface then try to save that surface, I get a small blank BMP as a result. Pseudo code as follows:
SDL_Surface* Image;
Image = load_image("Scan.bmp")
~~a bunch of stuff that crops image~~
SDL_SaveBMP(Image, "Output.bmp");
that would result in a file called output.bmp that is just a tiny white square.
If I blit image onto a screen surface (or really any other surface that's not that big) I can save the bmp, but it'll only save the size of the surface. Pseudo code as follows:
SDL_Surface* screen;
SDL_Surface* image;
~~~code which sets up screen to be 1280x768 big~~
image = load_image("Scan.bmp");
~~~code which blits image to screen~~
SDL_SaveBMP(screen, "Output.bmp");
That would result in a bmp called Output, which is 1280x768 big, which contains a corner of the scan. I'm guessing the problem lies with trying to work with such a large image. I've been trying to look up documentation to see if there are any size restrictions on SDL_SaveBMP but I can't find anything. Anyone know what could be causing this? Or maybe an alternative method I could use?