OpenVideo Documentation

   Main Page       Modules       Class Hierarchy       Alphabetical List       Compound List       File List       Compound Members       Related Pages   

PixelFormat.h

Go to the documentation of this file.
00001 /* ========================================================================
00002 * Copyright (C) 2005  Graz University of Technology
00003 *
00004 * This framework is free software; you can redistribute it and/or modify
00005 * it under the terms of the GNU General Public License as published by
00006 * the Free Software Foundation; either version 2 of the License, or
00007 * (at your option) any later version.
00008 *
00009 * This framework is distributed in the hope that it will be useful,
00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 * GNU General Public License for more details.
00013 *
00014 * You should have received a copy of the GNU General Public License
00015 * along with this framework; if not, write to the Free Software
00016 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017 *
00018 * For further information please contact Denis Kalkofen under
00019 * <kalkofen@icg.tu-graz.ac.at> or write to Denis Kalkofen,
00020 * Graz University of Technology, Inffeldgasse 16a, A8010 Graz,
00021 * Austria.
00022 * ========================================================================
00023 * PROJECT: OpenVideo
00024 * ======================================================================== */
00031 /* ======================================================================= */
00032 
00033 #ifndef _PIXELFORMAT_H
00034 #define _PIXELFORMAT_H
00035 
00036 #include <openvideo/openVideo.h>
00037 #include <string>
00038 
00039 
00040 namespace openvideo {
00041 
00042 
00043 enum PIXEL_FORMAT {
00044     FORMAT_R8G8B8   = 0,
00045     FORMAT_B8G8R8   = 1,
00046     FORMAT_R8G8B8X8 = 2,
00047     FORMAT_B8G8R8X8 = 3,
00048     FORMAT_R5G6B5   = 4,
00049     FORMAT_L8       = 5,
00050 
00051     FORMAT_UNKNOWN  = 6
00052 };
00053 
00054 
00055 class OPENVIDEO_API PixelFormat
00056 {
00057 public:
00058     static PIXEL_FORMAT StringToFormat(const std::string& formatName);
00059 
00060     static std::string FormatToString(PIXEL_FORMAT format);
00061 
00062     static PIXEL_FORMAT fromOGL(int format);
00063 
00064     static bool toOGL(PIXEL_FORMAT format, unsigned int& oglFormat, int& oglInternalFormat);
00065 
00066     static int getBitsPerPixel(PIXEL_FORMAT format);
00067 
00068 };  // namespace PixelFormat
00069 
00070 
00071 }  // namespace openvideo
00072 
00073 
00074 #endif //_PIXELFORMAT_H
 This page was generated at Wed May 31 13:04:16 2006 for OpenVideo by Doxygen.
 If you have any comments, please send a message to schmalstieg@icg.tu-graz.ac.at.
www.studierstube.org