]> git.sesse.net Git - casparcg/blobdiff - modules/image/util/image_loader.cpp
2.0.2: Updated file info headers.
[casparcg] / modules / image / util / image_loader.cpp
index 2e86d5b6e3998ba43e23fa3b10385364426a9823..42f1f3c7dc73766fa4d718ed526d53a639737fed 100644 (file)
@@ -1,3 +1,24 @@
+/*\r
+* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>\r
+*\r
+* This file is part of CasparCG (www.casparcg.com).\r
+*\r
+* CasparCG is free software: you can redistribute it and/or modify\r
+* it under the terms of the GNU General Public License as published by\r
+* the Free Software Foundation, either version 3 of the License, or\r
+* (at your option) any later version.\r
+*\r
+* CasparCG is distributed in the hope that it will be useful,\r
+* but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+* GNU General Public License for more details.\r
+*\r
+* You should have received a copy of the GNU General Public License\r
+* along with CasparCG. If not, see <http://www.gnu.org/licenses/>.\r
+*\r
+* Author: Robert Nagy, ronag89@gmail.com\r
+*/\r
+\r
 #include "image_loader.h"\r
 \r
 #include <common/exception/Exceptions.h>\r
 #pragma warning (disable : 4714) // marked as __forceinline not inlined\r
 #endif\r
 \r
-#include <boost/filesystem.hpp>\r
 #include <boost/exception/errinfo_file_name.hpp>\r
-#include <boost/thread/once.hpp>\r
+#include <boost/filesystem.hpp>\r
 \r
-namespace caspar { \r
+namespace caspar { namespace image {\r
 \r
 std::shared_ptr<FIBITMAP> load_image(const std::string& filename)\r
 {\r
-       struct FreeImage_initializer\r
-       {\r
-               FreeImage_initializer(){FreeImage_Initialise(true);}\r
-               ~FreeImage_initializer(){FreeImage_DeInitialise();}\r
-       } static init;\r
-\r
        if(!boost::filesystem::exists(filename))\r
                BOOST_THROW_EXCEPTION(file_not_found() << boost::errinfo_file_name(filename));\r
 \r
@@ -49,4 +63,4 @@ std::shared_ptr<FIBITMAP> load_image(const std::wstring& filename)
        return load_image(narrow(filename));\r
 }\r
 \r
-}
\ No newline at end of file
+}}
\ No newline at end of file