Skip to content

Commit a3f6cd5

Browse files
committed
Set Mat allocator in imread()
1 parent e2defe4 commit a3f6cd5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/imgcodecs.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ mp_obj_t cv2_imgcodecs_imread(size_t n_args, const mp_obj_t *pos_args, mp_map_t
6565

6666
// Decode the image from the buffer
6767
Mat img;
68+
img.allocator = &GetNumpyAllocator();
6869
try {
6970
img = imdecode(buf, flags);
7071
} catch(Exception& e) {

0 commit comments

Comments
 (0)