diff --git a/modules/imgcodecs/src/grfmt_exr.cpp b/modules/imgcodecs/src/grfmt_exr.cpp index 786b9d176b..65a0e5e03b 100644 --- a/modules/imgcodecs/src/grfmt_exr.cpp +++ b/modules/imgcodecs/src/grfmt_exr.cpp @@ -729,7 +729,7 @@ bool ExrEncoder::write( const Mat& img, const std::vector& params ) Mat exrMat; if( type == HALF ) { - convertFp16(img, exrMat); + img.convertTo(exrMat, CV_16F); buffer = (char *)const_cast( exrMat.ptr() ); bufferstep = exrMat.step; size = 2;