diff --git a/src/Matrix.cc b/src/Matrix.cc index 2564bbf..a9f15a2 100755 --- a/src/Matrix.cc +++ b/src/Matrix.cc @@ -317,7 +317,7 @@ NAN_METHOD(Matrix::GetData) { Nan::HandleScope scope; Matrix *self = Nan::ObjectWrap::Unwrap(info.This()); - int size = self->mat.rows * self->mat.cols * self->mat.elemSize1(); + int size = self->mat.rows * self->mat.cols * self->mat.elemSize(); Local buf = Nan::NewBuffer(size).ToLocalChecked(); uchar* data = (uchar*) Buffer::Data(buf); // if there is padding after each row, clone first to get rid of it