| 156 | */ |
| 157 | template <typename T> |
| 158 | void init_image(T &image, Format format) |
| 159 | { |
| 160 | ARM_COMPUTE_ERROR_ON(!is_open()); |
| 161 | ARM_COMPUTE_ERROR_ON(format != Format::RGB888 && format != Format::U8); |
| 162 | |
| 163 | // Use the size of the input image |
| 164 | TensorInfo image_info(_width, _height, format); |
| 165 | image.allocator()->init(image_info); |
| 166 | } |
| 167 | /** Fill an image with the content of the currently open image file. |
| 168 | * |
| 169 | * @note If the image is a CLImage, the function maps and unmaps the image |