MCPcopy Create free account
hub / github.com/RenderKit/embree / loadImage

Function loadImage

tutorials/common/image/image.cpp:58–67  ·  view source on GitHub ↗

! loads an image from a file with auto-detection of format */

Source from the content-addressed store, hash-verified

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)

Callers 3

parseCommandLineFunction · 0.85
loadMethod · 0.85

Calls 3

loadImageFromDiskFunction · 0.85
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected