Program that can split huge bitmaps

In my game I am importing maps that are huge, like 10000x10000 pixels. Flash cannot handle this so the bitmap does not show up at all. So to fix this I wrote a couple methods that split the bitmap into a certain number of chunks. However, this didn’t work either… I assume flash just couldn’t handle that initial large file size, so splitting that file was to no avail.

So does anyone know of a program that takes an image file and splits it into pieces and exports those pieces? I’d prefer not to do this manually with photoshop, especially if its just minor tweaks that I make.