[Jahshaka-cvs] SF.net SVN: openlibraries:[1463] trunk/src/openimagelib/il/utility.cpp
Status: Beta
Brought to you by:
jahshaka
From: <tim...@us...> - 2009-02-12 16:15:28
|
Revision: 1463 http://openlibraries.svn.sourceforge.net/openlibraries/?rev=1463&view=rev Author: timdewhirst Date: 2009-02-12 16:15:16 +0000 (Thu, 12 Feb 2009) Log Message: ----------- olibs * cleanup log messages * switch to use log Modified Paths: -------------- trunk/src/openimagelib/il/utility.cpp Modified: trunk/src/openimagelib/il/utility.cpp =================================================================== --- trunk/src/openimagelib/il/utility.cpp 2009-02-10 09:24:30 UTC (rev 1462) +++ trunk/src/openimagelib/il/utility.cpp 2009-02-12 16:15:16 UTC (rev 1463) @@ -16,6 +16,7 @@ #include <openpluginlib/pl/fast_math.hpp> #include <openpluginlib/pl/utf8_utils.hpp> #include <openpluginlib/pl/discovery_traits.hpp> +#include <openpluginlib/pl/log.hpp> #include <openimagelib/il/il.hpp> #include <openimagelib/il/openimagelib_plugin.hpp> #include <openimagelib/il/lut_converter.hpp> @@ -2117,9 +2118,7 @@ return l10_l12_l16p_ushort_with_alpha_to_b8g8r8a8( src, dst_pf ); } -#ifndef WIN32 - fprintf( stderr, "Unknown %s to %s\n", opl::to_string( src_pf ).c_str( ), opl::to_string( dst_pf ).c_str( ) ); -#endif + WARNING_LOG << "Unknown conversion: " << opl::to_string( src_pf ) << " to " << opl::to_string( dst_pf ); return image_type_ptr( ); } @@ -2517,7 +2516,8 @@ else if ( is_yuv( im ) ) return convert( rescale( convert( im, im->pf() + L"p" ), new_w, new_h, new_d, filter ), im->pf() ); - std::wcerr << L"rescale: failed to scale image\n"; + WARNING_LOG << "failed to scale image"; + return im; } @@ -3026,13 +3026,12 @@ discovery plugins( query ); if ( plugins.size( ) == 0 ) { - std::wcerr << L"get_plug: failed to find a plugin for: " << resource << L", " << type << L"\n"; + WARNING_LOG << "failed to find a plugin for: " << pl::to_string( resource ) << ", " << pl::to_string( type ); return result; } discovery::const_iterator i = plugins.begin( ); opl::opl_ptr plugin( i->create_plugin( "" ) ); - // std::wcerr << L"created plugin: " << plugin.get() << L"\n"; return boost::shared_dynamic_cast<openimagelib_plugin>( plugin ); } @@ -3052,7 +3051,7 @@ openimagelib_plugin_ptr plug = get_plug( resource, L"" ); if ( !plug ) { - std::wcerr << L"store_image: failed to find a plugin\n"; + WARNING_LOG << "failed to find a plugin for resource: " << opl::to_string( resource ); return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |