예제 #1
0
파일: dumptga.cpp 프로젝트: Glyth/xoreos
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());
}
예제 #2
0
파일: console.cpp 프로젝트: EffWun/xoreos
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());
}