MCPcopy Create free account
hub / github.com/beefytech/Beef / LoadFromFile

Method LoadFromFile

BeefySysLib/img/ImageData.cpp:125–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125bool ImageData::LoadFromFile(const StringImpl& path)
126{
127 int size = 0;
128 uint8* aData = LoadBinaryData(path, &size);
129 if (aData == NULL)
130 return false;
131 SetSrcData(aData, size);
132 bool result = ReadData();
133 if (mKeepSrcDataValid)
134 {
135 mOwnsSrcData = true;
136 }
137 else
138 {
139 delete [] mSrcData;
140 mSrcData = NULL;
141 }
142 return result;
143}
144
145void ImageData::SetSrcData(uint8* data, int dataLen)
146{

Callers 4

ConvImageFunction · 0.80
mainFunction · 0.80
LoadTextureMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected