MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / SaveToFile

Method SaveToFile

common/Image.cpp:113–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113bool RGBA8Image::SaveToFile(const char* filename, u8 quality) const
114{
115 auto fp = FileSystem::OpenManagedCFile(filename, "wb");
116 if (!fp)
117 return false;
118
119 if (SaveToFile(filename, fp.get(), quality))
120 return true;
121
122 // save failed
123 fp.reset();
124 FileSystem::DeleteFilePath(filename);
125 return false;
126}
127
128bool RGBA8Image::LoadFromFile(const char* filename, std::FILE* fp)
129{

Callers 1

Calls 4

GetFormatHandlerFunction · 0.85
getMethod · 0.45
resetMethod · 0.45
ErrorFmtMethod · 0.45

Tested by

no test coverage detected