Esempio n. 1
0
void dumpTGA(const Common::UString &fileName, const ImageDecoder *image) {
	if (!image || (image->getMipMapCount() < 1))
		throw Common::Exception("No image");

	const ImageDecoder::MipMap &mipMap = image->getMipMap(0);

	dumpTGA(fileName, mipMap.data, mipMap.width, mipMap.height, image->getFormat());
}
Esempio n. 2
0
void Console::cmdDumpTGA(const CommandLine &cl) {
	if (cl.args.empty()) {
		printCommandHelp(cl.cmd);
		return;
	}

	if (dumpTGA(cl.args))
		printf("Dumped TGA \"%s\"", cl.args.c_str());
	else
		printf("Failed dumping TGA \"%s\"", cl.args.c_str());
}