mirror of
https://github.com/opencv/opencv.git
synced 2026-09-12 13:23:03 -05:00
removed C API in the following modules: photo, video, imgcodecs, videoio (#13060)
* removed C API in the following modules: photo, video, imgcodecs, videoio * trying to fix various compile errors and warnings on Windows and Linux * continue to fix compile errors and warnings * continue to fix compile errors, warnings, as well as the test failures * trying to resolve compile warnings on Android * Update cap_dc1394_v2.cpp fix warning from the new GCC
This commit is contained in:
@@ -453,16 +453,16 @@ bool JpegDecoder::readData( Mat& img )
|
||||
if( color )
|
||||
{
|
||||
if( cinfo->out_color_components == 3 )
|
||||
icvCvt_RGB2BGR_8u_C3R( buffer[0], 0, data, 0, cvSize(m_width,1) );
|
||||
icvCvt_RGB2BGR_8u_C3R( buffer[0], 0, data, 0, Size(m_width,1) );
|
||||
else
|
||||
icvCvt_CMYK2BGR_8u_C4C3R( buffer[0], 0, data, 0, cvSize(m_width,1) );
|
||||
icvCvt_CMYK2BGR_8u_C4C3R( buffer[0], 0, data, 0, Size(m_width,1) );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( cinfo->out_color_components == 1 )
|
||||
memcpy( data, buffer[0], m_width );
|
||||
else
|
||||
icvCvt_CMYK2Gray_8u_C4C1R( buffer[0], 0, data, 0, cvSize(m_width,1) );
|
||||
icvCvt_CMYK2Gray_8u_C4C1R( buffer[0], 0, data, 0, Size(m_width,1) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -689,12 +689,12 @@ bool JpegEncoder::write( const Mat& img, const std::vector<int>& params )
|
||||
|
||||
if( _channels == 3 )
|
||||
{
|
||||
icvCvt_BGR2RGB_8u_C3R( data, 0, buffer, 0, cvSize(width,1) );
|
||||
icvCvt_BGR2RGB_8u_C3R( data, 0, buffer, 0, Size(width,1) );
|
||||
ptr = buffer;
|
||||
}
|
||||
else if( _channels == 4 )
|
||||
{
|
||||
icvCvt_BGRA2BGR_8u_C4C3R( data, 0, buffer, 0, cvSize(width,1), 2 );
|
||||
icvCvt_BGRA2BGR_8u_C4C3R( data, 0, buffer, 0, Size(width,1), 2 );
|
||||
ptr = buffer;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user