| 200 | } |
| 201 | |
| 202 | ThumbnailerImageType 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 |
| 223 | typedef void* (*FileCreateFunc)(const char*); |