[Jahshaka-cvs] openlibraries/src/openimagelib/il utility.cpp, 1.44, 1.45
Status: Beta
Brought to you by:
jahshaka
From: Goncalo N. M. de C. <gl...@us...> - 2006-09-20 11:12:56
|
Update of /cvsroot/openlibraries/openlibraries/src/openimagelib/il In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11541/src/openimagelib/il Modified Files: utility.cpp Log Message: +a8b8g8r8 to b8g8r8a8 conversion Index: utility.cpp =================================================================== RCS file: /cvsroot/openlibraries/openlibraries/src/openimagelib/il/utility.cpp,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- utility.cpp 13 Sep 2006 13:55:17 -0000 1.44 +++ utility.cpp 20 Sep 2006 11:12:52 -0000 1.45 @@ -16,14 +16,14 @@ namespace olib { namespace openimagelib { namespace il { -namespace -{ - // Not complete (exercise for the reader :) ). - bool is_yuv_format( const wstring& pf ) - { - return pf == L"yuv444" || pf == L"yuv420p"; - } -} +//namespace +//{ +// // Not complete (exercise for the reader :) ). +// bool is_yuv_format( const wstring& pf ) +// { +// return pf == L"yuv444" || pf == L"yuv420p"; +// } +//} // The following private functions are a bit rough and shouldn't be exposed publicly // All access to the functions are via the public convert and allocate functions @@ -969,6 +969,7 @@ { L"b8g8r8a8", L"r8g8b8a8", 4, { 2, 1, 0, 3 }, 4, { 0, 1, 2, 3 } }, { L"b8g8r8a8", L"a8b8g8r8", 4, { 2, 1, 0, 3 }, 4, { 3, 2, 1, 0 } }, { L"a8r8g8b8", L"a8b8g8r8", 4, { 1, 2, 3, 0 }, 4, { 3, 2, 1, 0 } }, + { L"a8b8g8r8", L"b8g8r8a8", 4, { 3, 2, 1, 0 }, 4, { 2, 1, 0, 3 } }, { L"l8a8", L"b8g8r8a8", 2, { 0, 0, 0, 1 }, 4, { 2, 1, 0, 3 } }, { L"l8a8", L"b8g8r8", 2, { 0, 0, 0, 1 }, 3, { 2, 1, 0, 0 } }, { L"", L"", 0, { 0, 0, 0, 0 }, 0, { 0, 0, 0, 0 } } @@ -1191,7 +1192,6 @@ std::wstring src_pf = src->pf( ); // Convert - if ( dst_pf == src_pf ) { return src; @@ -1285,6 +1285,11 @@ if( dst_pf == L"a8b8g8r8" ) return rgb_to_rgb( src, dst_pf ); } + else if( src_pf == L"a8b8g8r8" ) + { + if( dst_pf == L"b8g8r8a8" ) + return rgb_to_rgb( src, dst_pf ); + } else if ( src_pf == L"yuv444" ) { if ( dst_pf == L"r8g8b8" ) |