MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / open

Method open

utils/ImageLoader.h:456–472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

454 return _is_loaded;
455 }
456 void open(const std::string &filename) override
457 {
458 int bpp, width, height;
459 uint8_t *rgb_image = stbi_load(filename.c_str(), &width, &height, &bpp, 3);
460 if (rgb_image == NULL)
461 {
462 ARM_COMPUTE_ERROR_VAR("Accessing %s failed", filename.c_str());
463 }
464 else
465 {
466 _width = width;
467 _height = height;
468 _data = std::unique_ptr<uint8_t, malloc_deleter>(rgb_image);
469 _is_loaded = true;
470 _feeder = std::make_unique<MemoryImageFeeder>(_data.get());
471 }
472 }
473 void close() override
474 {
475 if (is_open())

Callers

nothing calls this directly

Calls 2

stbi_loadFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected