added variant of cv::imdecode with the specified output matrix

This commit is contained in:
Vadim Pisarevsky
2012-10-01 16:23:40 +04:00
parent 420dd22258
commit c9f1490302
3 changed files with 25 additions and 2 deletions

View File

@@ -395,6 +395,14 @@ Mat imdecode( InputArray _buf, int flags )
return img;
}
Mat imdecode( InputArray _buf, int flags, Mat* dst )
{
Mat buf = _buf.getMat(), img;
dst = dst ? dst : &img;
imdecode_( buf, flags, LOAD_MAT, dst );
return *dst;
}
bool imencode( const string& ext, InputArray _image,
vector<uchar>& buf, const vector<int>& params )
{