MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / dumpPcx

Function dumpPcx

tools/dump_everything/dump_everything.cpp:1141–1155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1139}
1140
1141static void dumpPcx(fs::path outDir, const UString &prefix)
1142{
1143 auto outName = prefix + ".png";
1144 auto pcxName = prefix + ".pcx";
1145 auto path = outDir / outName.str();
1146 fs::create_directories(path.parent_path());
1147 LogWarning("Reading \"%s\"", pcxName);
1148 auto img = fw().data->loadImage(pcxName);
1149 if (!img)
1150 {
1151 LogError("Failed to load pcx \"%s\"", pcxName);
1152 return;
1153 }
1154 fw().data->writeImage(path.native(), img);
1155}
1156
1157int main(int argc, char **argv)
1158{

Callers 1

mainFunction · 0.85

Calls 2

loadImageMethod · 0.45
writeImageMethod · 0.45

Tested by

no test coverage detected