! loads an image from a file with auto-detection of format */
| 56 | |
| 57 | /*! loads an image from a file with auto-detection of format */ |
| 58 | Ref<Image> loadImage(const FileName& fileName, bool cache) |
| 59 | { |
| 60 | if (!cache) |
| 61 | return loadImageFromDisk(fileName); |
| 62 | |
| 63 | if (image_cache.find(fileName) == image_cache.end()) |
| 64 | image_cache[fileName] = loadImageFromDisk(fileName); |
| 65 | |
| 66 | return image_cache[fileName]; |
| 67 | } |
| 68 | |
| 69 | /*! stores an image to file with auto-detection of format */ |
| 70 | void storeImage(const Ref<Image>& img, const FileName& fileName) |
no test coverage detected