MCPcopy Create free account
hub / github.com/dirkvdb/ffmpegthumbnailer / determineImageTypeFromString

Function determineImageTypeFromString

main.cpp:202–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202ThumbnailerImageType determineImageTypeFromString(const std::string& type)
203{
204 std::string lowercaseType = type;
205 StringOperations::lowercase(lowercaseType);
206
207 if (lowercaseType == "png") {
208 return Png;
209 }
210
211 if (lowercaseType == "jpeg" || lowercaseType == "jpg") {
212 return Jpeg;
213 }
214
215 if (lowercaseType == "raw" || lowercaseType == "rgb") {
216 return Rgb;
217 }
218
219 throw std::logic_error("Invalid image type specified");
220}
221
222#ifdef ENABLE_GIO
223typedef void* (*FileCreateFunc)(const char*);

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected