TuttleOFX  1
ofxPixels.h
Go to the documentation of this file.
00001 #ifndef _ofxPixels_h_
00002 #define _ofxPixels_h_
00003 
00004 /*
00005 Software License :
00006 
00007 Copyright (c) 2009, The Open Effects Association Ltd. All rights reserved.
00008 
00009 Redistribution and use in source and binary forms, with or without
00010 modification, are permitted provided that the following conditions are met:
00011 
00012     * Redistributions of source code must retain the above copyright notice,
00013       this list of conditions and the following disclaimer.
00014     * Redistributions in binary form must reproduce the above copyright notice,
00015       this list of conditions and the following disclaimer in the documentation
00016       and/or other materials provided with the distribution.
00017     * Neither the name The Open Effects Association Ltd, nor the names of its 
00018       contributors may be used to endorse or promote products derived from this
00019       software without specific prior written permission.
00020 
00021 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
00022 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00023 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00024 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
00025 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00026 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00027 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
00028 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00029 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00030 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00031 */
00032 
00033 
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037 
00038 /** @file ofxPixels.h
00039 Contains pixel struct definitions
00040 */
00041 
00042 /** @brief Defines an 8 bit per component RGBA pixel */
00043 typedef struct OfxRGBAColourB {
00044   unsigned char r, g, b, a;
00045 }OfxRGBAColourB;
00046 
00047 /** @brief Defines a 16 bit per component RGBA pixel */
00048 typedef struct OfxRGBAColourS {
00049   unsigned short r, g, b, a;
00050 }OfxRGBAColourS;
00051 
00052 /** @brief Defines a floating point component RGBA pixel */
00053 typedef struct OfxRGBAColourF {
00054   float r, g, b, a;
00055 }OfxRGBAColourF;
00056 
00057 
00058 /** @brief Defines a double precision floating point component RGBA pixel */
00059 typedef struct OfxRGBAColourD {
00060   double r, g, b, a;
00061 }OfxRGBAColourD;
00062 
00063 
00064 /** @brief Defines an 8 bit per component RGB pixel */
00065 typedef struct OfxRGBColourB {
00066   unsigned char r, g, b;
00067 }OfxRGBColourB;
00068 
00069 /** @brief Defines a 16 bit per component RGB pixel */
00070 typedef struct OfxRGBColourS {
00071   unsigned short r, g, b;
00072 }OfxRGBColourS;
00073 
00074 /** @brief Defines a floating point component RGB pixel */
00075 typedef struct OfxRGBColourF {
00076   float r, g, b;
00077 }OfxRGBColourF;
00078 
00079 /** @brief Defines a double precision floating point component RGB pixel */
00080 typedef struct OfxRGBColourD {
00081   double r, g, b; ///< @warning tuttle fix
00082 }OfxRGBColourD;
00083 
00084 /** @brief Defines an 8 bit per component YUVA pixel */
00085 typedef struct OfxYUVAColourB {
00086   unsigned char y, u, v, a;
00087 }OfxYUVAColourB;
00088 
00089 /** @brief Defines an 16 bit per component YUVA pixel */
00090 typedef struct OfxYUVAColourS {
00091   unsigned short y, u, v, a;
00092 }OfxYUVAColourS;
00093 
00094 /** @brief Defines an floating point component YUVA pixel */
00095 typedef struct OfxYUVAColourF {
00096   float y, u, v, a;
00097 }OfxYUVAColourF;
00098 
00099 #ifdef __cplusplus
00100 }
00101 #endif
00102 
00103 #endif