Unfortunately, the Targa TGA format only supports widths and heights up to 65535 pixels (or, 5.55 metres at 300 pixels per inch), stored as a couple of short unsigned ints in the TGA header data.
Do you have experience with a simple format that doesn't have such a limitation?