\hypertarget{class_ogre_1_1_pixel_util}{}\section{Ogre\+:\+:Pixel\+Util Class Reference}
\label{class_ogre_1_1_pixel_util}\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}


Some utility functions for packing and unpacking pixel data.  




{\ttfamily \#include $<$Ogre\+Pixel\+Format.\+h$>$}

\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static void \hyperlink{class_ogre_1_1_pixel_util_a0cae4443af5f8feb1c2f4f0905277c34}{bulk\+Pixel\+Conversion} (void $\ast$src, \hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} src\+Format, void $\ast$dst, \hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} dst\+Format, unsigned int count)
\begin{DoxyCompactList}\small\item\em Convert consecutive pixels from one format to another. \end{DoxyCompactList}\item 
static void \hyperlink{class_ogre_1_1_pixel_util_a9f6e459a0f92c0c8e6bf4f20ee3a771a}{bulk\+Pixel\+Conversion} (const \hyperlink{class_ogre_1_1_pixel_box}{Pixel\+Box} \&src, const \hyperlink{class_ogre_1_1_pixel_box}{Pixel\+Box} \&dst)
\begin{DoxyCompactList}\small\item\em Convert pixels from one format to another. \end{DoxyCompactList}\item 
static void \hyperlink{class_ogre_1_1_pixel_util_a3d8f29c8c1181ba98e22e342169970fd}{bulk\+Pixel\+Vertical\+Flip} (const \hyperlink{class_ogre_1_1_pixel_box}{Pixel\+Box} \&box)
\begin{DoxyCompactList}\small\item\em Flips pixels inplace in vertical direction. \end{DoxyCompactList}\item 
static void \hyperlink{class_ogre_1_1_pixel_util_a91159ec54a34fca27ccc7621c9b6d957}{get\+Bit\+Depths} (\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} format, int rgba\mbox{[}4\mbox{]})
\begin{DoxyCompactList}\small\item\em Gives the number of bits (R\+G\+BA) for a format. \end{DoxyCompactList}\item 
static void \hyperlink{class_ogre_1_1_pixel_util_a9fc6dbbd70a1f24b18db99cb1d2dae5d}{get\+Bit\+Masks} (\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} format, \hyperlink{namespace_ogre_a7e1487b57f16a1479302d1896c6f4445}{uint64} rgba\mbox{[}4\mbox{]})
\begin{DoxyCompactList}\small\item\em Gives the masks for the R, G, B and A component. \end{DoxyCompactList}\item 
static void \hyperlink{class_ogre_1_1_pixel_util_afbd54e9abc204019624bf99bc8cdb3c1}{get\+Bit\+Shifts} (\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} format, unsigned char rgba\mbox{[}4\mbox{]})
\begin{DoxyCompactList}\small\item\em Gives the bit shifts for R, G, B and A component. \end{DoxyCompactList}\item 
static \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \hyperlink{class_ogre_1_1_pixel_util_a32443d01d6399f778fce913ca80b0eee}{get\+B\+N\+F\+Expression\+Of\+Pixel\+Formats} (bool accessible\+Only=false)
\begin{DoxyCompactList}\small\item\em Gets the B\+NF expression of the pixel-\/formats. \end{DoxyCompactList}\item 
static size\+\_\+t \hyperlink{class_ogre_1_1_pixel_util_ae81ba2514ca7f5a53c84bb515de2ade0}{get\+Component\+Count} (\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} fmt)
\begin{DoxyCompactList}\small\item\em Returns the component count for a certain pixel format. \end{DoxyCompactList}\item 
static \hyperlink{group___image_gac8f59c884998d9f84d9ea4c66e4c29fe}{Pixel\+Component\+Type} \hyperlink{class_ogre_1_1_pixel_util_a90ebf73b3830df2e83d529e60fd8c385}{get\+Component\+Type} (\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} fmt)
\begin{DoxyCompactList}\small\item\em Returns the component type for a certain pixel format. \end{DoxyCompactList}\item 
static unsigned int \hyperlink{class_ogre_1_1_pixel_util_ae0c13cd6390b11bc851c9e2ba1201f40}{get\+Flags} (\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} format)
\begin{DoxyCompactList}\small\item\em Returns the property flags for this pixel format. \end{DoxyCompactList}\item 
static \hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} \hyperlink{class_ogre_1_1_pixel_util_ae127c3e6145af784e7d2d3734681a75a}{get\+Format\+For\+Bit\+Depths} (\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} fmt, \hyperlink{namespace_ogre_af851e71354d841df7138f9877c6f5931}{ushort} integer\+Bits, \hyperlink{namespace_ogre_af851e71354d841df7138f9877c6f5931}{ushort} float\+Bits)
\begin{DoxyCompactList}\small\item\em Returns the similar format but acoording with given bit depths. \end{DoxyCompactList}\item 
static \hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} \hyperlink{class_ogre_1_1_pixel_util_a601fd16392331e7ddce6bcc455b5729d}{get\+Format\+From\+Name} (const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&name, bool accessible\+Only=false, bool case\+Sensitive=false)
\begin{DoxyCompactList}\small\item\em Gets the format from given name. \end{DoxyCompactList}\item 
static const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \& \hyperlink{class_ogre_1_1_pixel_util_af74abffb573e5984070e354f6bba2f8e}{get\+Format\+Name} (\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} srcformat)
\begin{DoxyCompactList}\small\item\em Gets the name of an image format. \end{DoxyCompactList}\item 
static size\+\_\+t \hyperlink{class_ogre_1_1_pixel_util_a865aa435b593756fe2d2bd2463a18199}{get\+Memory\+Size} (\hyperlink{namespace_ogre_adf2a0cf2e77143b5ee1d38a75e289545}{uint32} width, \hyperlink{namespace_ogre_adf2a0cf2e77143b5ee1d38a75e289545}{uint32} height, \hyperlink{namespace_ogre_adf2a0cf2e77143b5ee1d38a75e289545}{uint32} depth, \hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} format)
\begin{DoxyCompactList}\small\item\em Returns the size in memory of a region with the given extents and pixel format with consecutive memory layout. \end{DoxyCompactList}\item 
static size\+\_\+t \hyperlink{class_ogre_1_1_pixel_util_a1dbc281fe64d9f70b3ce5e6d3011cafb}{get\+Num\+Elem\+Bits} (\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} format)
\begin{DoxyCompactList}\small\item\em Returns the size in bits of an element of the given pixel format. \end{DoxyCompactList}\item 
static size\+\_\+t \hyperlink{class_ogre_1_1_pixel_util_a1e39ec27d40f044a058e6fef850a1fbe}{get\+Num\+Elem\+Bytes} (\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} format)
\begin{DoxyCompactList}\small\item\em Returns the size in bytes of an element of the given pixel format. \end{DoxyCompactList}\item 
static bool \hyperlink{class_ogre_1_1_pixel_util_a1e15a9f2c0dc1cba158755633574fbc7}{has\+Alpha} (\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} format)
\begin{DoxyCompactList}\small\item\em Shortcut method to determine if the format has an alpha component. \end{DoxyCompactList}\item 
static bool \hyperlink{class_ogre_1_1_pixel_util_a2a9e6ac27e4a4cb2d890d322b3f12c8e}{is\+Accessible} (\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} srcformat)
\begin{DoxyCompactList}\small\item\em Returns whether the format can be packed or unpacked with the \hyperlink{class_ogre_1_1_pixel_util_a793a7ae2bb8edec89ab520958ac33f40}{pack\+Colour()} and \hyperlink{class_ogre_1_1_pixel_util_a9b90b16c6c5c8a9fefd42e06a1bd99dc}{unpack\+Colour()} functions. \end{DoxyCompactList}\item 
static bool \hyperlink{class_ogre_1_1_pixel_util_ac4fcce8523b25011939624bfe2572314}{is\+Compressed} (\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} format)
\begin{DoxyCompactList}\small\item\em Shortcut method to determine if the format is compressed. \end{DoxyCompactList}\item 
static bool \hyperlink{class_ogre_1_1_pixel_util_a51407cd07e47f24263942453ee4f93af}{is\+Depth} (\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} format)
\begin{DoxyCompactList}\small\item\em Shortcut method to determine if the format is a depth format. \end{DoxyCompactList}\item 
static bool \hyperlink{class_ogre_1_1_pixel_util_a478b8c3bbb3bc516f3a06524fc1d9f4b}{is\+Floating\+Point} (\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} format)
\begin{DoxyCompactList}\small\item\em Shortcut method to determine if the format is floating point. \end{DoxyCompactList}\item 
static bool \hyperlink{class_ogre_1_1_pixel_util_a1cda0d2a6af4cce55af33eae0b743822}{is\+Integer} (\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} format)
\begin{DoxyCompactList}\small\item\em Shortcut method to determine if the format is integer. \end{DoxyCompactList}\item 
static bool \hyperlink{class_ogre_1_1_pixel_util_a7e2ff8ebe2e05d6c0dc5ab725b294cf8}{is\+Luminance} (\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} format)
\begin{DoxyCompactList}\small\item\em Shortcut method to determine if the format is a luminance format. \end{DoxyCompactList}\item 
static bool \hyperlink{class_ogre_1_1_pixel_util_aa6a3f3c1e6b98b537ce6dfed949afa3c}{is\+Native\+Endian} (\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} format)
\begin{DoxyCompactList}\small\item\em Shortcut method to determine if the format is in native endian format. \end{DoxyCompactList}\item 
static void \hyperlink{class_ogre_1_1_pixel_util_a793a7ae2bb8edec89ab520958ac33f40}{pack\+Colour} (const \hyperlink{class_ogre_1_1_colour_value}{Colour\+Value} \&colour, const \hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} pf, void $\ast$dest)
\begin{DoxyCompactList}\small\item\em Pack a colour value to memory. \end{DoxyCompactList}\item 
static void \hyperlink{class_ogre_1_1_pixel_util_af0658994fbf0337d455ac9aa74ee8084}{pack\+Colour} (const \hyperlink{namespace_ogre_a119732ea9d1e88bbddc47b4ac0fa21cb}{uint8} r, const \hyperlink{namespace_ogre_a119732ea9d1e88bbddc47b4ac0fa21cb}{uint8} g, const \hyperlink{namespace_ogre_a119732ea9d1e88bbddc47b4ac0fa21cb}{uint8} b, const \hyperlink{namespace_ogre_a119732ea9d1e88bbddc47b4ac0fa21cb}{uint8} a, const \hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} pf, void $\ast$dest)
\begin{DoxyCompactList}\small\item\em Pack a colour value to memory. \end{DoxyCompactList}\item 
static void \hyperlink{class_ogre_1_1_pixel_util_a29490454e6327a0429d19533880f6e2c}{pack\+Colour} (const float r, const float g, const float b, const float a, const \hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} pf, void $\ast$dest)
\begin{DoxyCompactList}\small\item\em Pack a colour value to memory. \end{DoxyCompactList}\item 
static void \hyperlink{class_ogre_1_1_pixel_util_a9b90b16c6c5c8a9fefd42e06a1bd99dc}{unpack\+Colour} (\hyperlink{class_ogre_1_1_colour_value}{Colour\+Value} $\ast$colour, \hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} pf, const void $\ast$src)
\begin{DoxyCompactList}\small\item\em Unpack a colour value from memory. \end{DoxyCompactList}\item 
static void \hyperlink{class_ogre_1_1_pixel_util_a6599a03e4d51ef96f373f47253e2b9e3}{unpack\+Colour} (\hyperlink{namespace_ogre_a119732ea9d1e88bbddc47b4ac0fa21cb}{uint8} $\ast$r, \hyperlink{namespace_ogre_a119732ea9d1e88bbddc47b4ac0fa21cb}{uint8} $\ast$g, \hyperlink{namespace_ogre_a119732ea9d1e88bbddc47b4ac0fa21cb}{uint8} $\ast$b, \hyperlink{namespace_ogre_a119732ea9d1e88bbddc47b4ac0fa21cb}{uint8} $\ast$a, \hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} pf, const void $\ast$src)
\begin{DoxyCompactList}\small\item\em Unpack a colour value from memory. \end{DoxyCompactList}\item 
static void \hyperlink{class_ogre_1_1_pixel_util_ae1448ad9a222ed03918f2e94a057612c}{unpack\+Colour} (float $\ast$r, float $\ast$g, float $\ast$b, float $\ast$a, \hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} pf, const void $\ast$src)
\begin{DoxyCompactList}\small\item\em Unpack a colour value from memory. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Some utility functions for packing and unpacking pixel data. 

\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_pixel_util_a1e39ec27d40f044a058e6fef850a1fbe}\label{class_ogre_1_1_pixel_util_a1e39ec27d40f044a058e6fef850a1fbe}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!get\+Num\+Elem\+Bytes@{get\+Num\+Elem\+Bytes}}
\index{get\+Num\+Elem\+Bytes@{get\+Num\+Elem\+Bytes}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{get\+Num\+Elem\+Bytes()}{getNumElemBytes()}}
{\footnotesize\ttfamily static size\+\_\+t Ogre\+::\+Pixel\+Util\+::get\+Num\+Elem\+Bytes (\begin{DoxyParamCaption}\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{format }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Returns the size in bytes of an element of the given pixel format. 

\begin{DoxyReturn}{Returns}
The size in bytes of an element. See Remarks. 
\end{DoxyReturn}
\begin{DoxyRemark}{Remarks}
Passing P\+F\+\_\+\+U\+N\+K\+N\+O\+WN will result in returning a size of 0 bytes. 
\end{DoxyRemark}
\mbox{\Hypertarget{class_ogre_1_1_pixel_util_a1dbc281fe64d9f70b3ce5e6d3011cafb}\label{class_ogre_1_1_pixel_util_a1dbc281fe64d9f70b3ce5e6d3011cafb}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!get\+Num\+Elem\+Bits@{get\+Num\+Elem\+Bits}}
\index{get\+Num\+Elem\+Bits@{get\+Num\+Elem\+Bits}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{get\+Num\+Elem\+Bits()}{getNumElemBits()}}
{\footnotesize\ttfamily static size\+\_\+t Ogre\+::\+Pixel\+Util\+::get\+Num\+Elem\+Bits (\begin{DoxyParamCaption}\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{format }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Returns the size in bits of an element of the given pixel format. 

\begin{DoxyReturn}{Returns}
The size in bits of an element. See Remarks. 
\end{DoxyReturn}
\begin{DoxyRemark}{Remarks}
Passing P\+F\+\_\+\+U\+N\+K\+N\+O\+WN will result in returning a size of 0 bits. 
\end{DoxyRemark}
\mbox{\Hypertarget{class_ogre_1_1_pixel_util_a865aa435b593756fe2d2bd2463a18199}\label{class_ogre_1_1_pixel_util_a865aa435b593756fe2d2bd2463a18199}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!get\+Memory\+Size@{get\+Memory\+Size}}
\index{get\+Memory\+Size@{get\+Memory\+Size}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{get\+Memory\+Size()}{getMemorySize()}}
{\footnotesize\ttfamily static size\+\_\+t Ogre\+::\+Pixel\+Util\+::get\+Memory\+Size (\begin{DoxyParamCaption}\item[{\hyperlink{namespace_ogre_adf2a0cf2e77143b5ee1d38a75e289545}{uint32}}]{width,  }\item[{\hyperlink{namespace_ogre_adf2a0cf2e77143b5ee1d38a75e289545}{uint32}}]{height,  }\item[{\hyperlink{namespace_ogre_adf2a0cf2e77143b5ee1d38a75e289545}{uint32}}]{depth,  }\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{format }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Returns the size in memory of a region with the given extents and pixel format with consecutive memory layout. 


\begin{DoxyParams}{Parameters}
{\em width} & The width of the area \\
\hline
{\em height} & The height of the area \\
\hline
{\em depth} & The depth of the area \\
\hline
{\em format} & The format of the area \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The size in bytes 
\end{DoxyReturn}
\begin{DoxyRemark}{Remarks}
In case that the format is non-\/compressed, this simply returns width $\ast$ height $\ast$ depth $\ast$ Pixel\+Util\+::get\+Num\+Elem\+Bytes(format). In the compressed case, this does serious magic. 
\end{DoxyRemark}
\mbox{\Hypertarget{class_ogre_1_1_pixel_util_ae0c13cd6390b11bc851c9e2ba1201f40}\label{class_ogre_1_1_pixel_util_ae0c13cd6390b11bc851c9e2ba1201f40}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!get\+Flags@{get\+Flags}}
\index{get\+Flags@{get\+Flags}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{get\+Flags()}{getFlags()}}
{\footnotesize\ttfamily static unsigned int Ogre\+::\+Pixel\+Util\+::get\+Flags (\begin{DoxyParamCaption}\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{format }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Returns the property flags for this pixel format. 

\begin{DoxyReturn}{Returns}
A bitfield combination of P\+F\+F\+\_\+\+H\+A\+S\+A\+L\+P\+HA, P\+F\+F\+\_\+\+I\+S\+C\+O\+M\+P\+R\+E\+S\+S\+ED, P\+F\+F\+\_\+\+F\+L\+O\+AT, P\+F\+F\+\_\+\+D\+E\+P\+TH, P\+F\+F\+\_\+\+N\+A\+T\+I\+V\+E\+E\+N\+D\+I\+AN, P\+F\+F\+\_\+\+L\+U\+M\+I\+N\+A\+N\+CE 
\end{DoxyReturn}
\begin{DoxyRemark}{Remarks}
This replaces the separate functions for format\+Has\+Alpha, format\+Is\+Float, ... 
\end{DoxyRemark}
\mbox{\Hypertarget{class_ogre_1_1_pixel_util_a1e15a9f2c0dc1cba158755633574fbc7}\label{class_ogre_1_1_pixel_util_a1e15a9f2c0dc1cba158755633574fbc7}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!has\+Alpha@{has\+Alpha}}
\index{has\+Alpha@{has\+Alpha}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{has\+Alpha()}{hasAlpha()}}
{\footnotesize\ttfamily static bool Ogre\+::\+Pixel\+Util\+::has\+Alpha (\begin{DoxyParamCaption}\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{format }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Shortcut method to determine if the format has an alpha component. 

\mbox{\Hypertarget{class_ogre_1_1_pixel_util_a478b8c3bbb3bc516f3a06524fc1d9f4b}\label{class_ogre_1_1_pixel_util_a478b8c3bbb3bc516f3a06524fc1d9f4b}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!is\+Floating\+Point@{is\+Floating\+Point}}
\index{is\+Floating\+Point@{is\+Floating\+Point}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{is\+Floating\+Point()}{isFloatingPoint()}}
{\footnotesize\ttfamily static bool Ogre\+::\+Pixel\+Util\+::is\+Floating\+Point (\begin{DoxyParamCaption}\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{format }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Shortcut method to determine if the format is floating point. 

\mbox{\Hypertarget{class_ogre_1_1_pixel_util_a1cda0d2a6af4cce55af33eae0b743822}\label{class_ogre_1_1_pixel_util_a1cda0d2a6af4cce55af33eae0b743822}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!is\+Integer@{is\+Integer}}
\index{is\+Integer@{is\+Integer}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{is\+Integer()}{isInteger()}}
{\footnotesize\ttfamily static bool Ogre\+::\+Pixel\+Util\+::is\+Integer (\begin{DoxyParamCaption}\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{format }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Shortcut method to determine if the format is integer. 

\mbox{\Hypertarget{class_ogre_1_1_pixel_util_ac4fcce8523b25011939624bfe2572314}\label{class_ogre_1_1_pixel_util_ac4fcce8523b25011939624bfe2572314}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!is\+Compressed@{is\+Compressed}}
\index{is\+Compressed@{is\+Compressed}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{is\+Compressed()}{isCompressed()}}
{\footnotesize\ttfamily static bool Ogre\+::\+Pixel\+Util\+::is\+Compressed (\begin{DoxyParamCaption}\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{format }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Shortcut method to determine if the format is compressed. 

\mbox{\Hypertarget{class_ogre_1_1_pixel_util_a51407cd07e47f24263942453ee4f93af}\label{class_ogre_1_1_pixel_util_a51407cd07e47f24263942453ee4f93af}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!is\+Depth@{is\+Depth}}
\index{is\+Depth@{is\+Depth}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{is\+Depth()}{isDepth()}}
{\footnotesize\ttfamily static bool Ogre\+::\+Pixel\+Util\+::is\+Depth (\begin{DoxyParamCaption}\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{format }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Shortcut method to determine if the format is a depth format. 

\mbox{\Hypertarget{class_ogre_1_1_pixel_util_aa6a3f3c1e6b98b537ce6dfed949afa3c}\label{class_ogre_1_1_pixel_util_aa6a3f3c1e6b98b537ce6dfed949afa3c}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!is\+Native\+Endian@{is\+Native\+Endian}}
\index{is\+Native\+Endian@{is\+Native\+Endian}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{is\+Native\+Endian()}{isNativeEndian()}}
{\footnotesize\ttfamily static bool Ogre\+::\+Pixel\+Util\+::is\+Native\+Endian (\begin{DoxyParamCaption}\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{format }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Shortcut method to determine if the format is in native endian format. 

\mbox{\Hypertarget{class_ogre_1_1_pixel_util_a7e2ff8ebe2e05d6c0dc5ab725b294cf8}\label{class_ogre_1_1_pixel_util_a7e2ff8ebe2e05d6c0dc5ab725b294cf8}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!is\+Luminance@{is\+Luminance}}
\index{is\+Luminance@{is\+Luminance}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{is\+Luminance()}{isLuminance()}}
{\footnotesize\ttfamily static bool Ogre\+::\+Pixel\+Util\+::is\+Luminance (\begin{DoxyParamCaption}\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{format }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Shortcut method to determine if the format is a luminance format. 

\mbox{\Hypertarget{class_ogre_1_1_pixel_util_a91159ec54a34fca27ccc7621c9b6d957}\label{class_ogre_1_1_pixel_util_a91159ec54a34fca27ccc7621c9b6d957}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!get\+Bit\+Depths@{get\+Bit\+Depths}}
\index{get\+Bit\+Depths@{get\+Bit\+Depths}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{get\+Bit\+Depths()}{getBitDepths()}}
{\footnotesize\ttfamily static void Ogre\+::\+Pixel\+Util\+::get\+Bit\+Depths (\begin{DoxyParamCaption}\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{format,  }\item[{int}]{rgba\mbox{[}4\mbox{]} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Gives the number of bits (R\+G\+BA) for a format. 

See remarks. \begin{DoxyRemark}{Remarks}
For non-\/colour formats (dxt, depth) this returns \mbox{[}0,0,0,0\mbox{]}. 
\end{DoxyRemark}
\mbox{\Hypertarget{class_ogre_1_1_pixel_util_a9fc6dbbd70a1f24b18db99cb1d2dae5d}\label{class_ogre_1_1_pixel_util_a9fc6dbbd70a1f24b18db99cb1d2dae5d}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!get\+Bit\+Masks@{get\+Bit\+Masks}}
\index{get\+Bit\+Masks@{get\+Bit\+Masks}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{get\+Bit\+Masks()}{getBitMasks()}}
{\footnotesize\ttfamily static void Ogre\+::\+Pixel\+Util\+::get\+Bit\+Masks (\begin{DoxyParamCaption}\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{format,  }\item[{\hyperlink{namespace_ogre_a7e1487b57f16a1479302d1896c6f4445}{uint64}}]{rgba\mbox{[}4\mbox{]} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Gives the masks for the R, G, B and A component. 

\begin{DoxyNote}{Note}
Only valid for native endian formats 
\end{DoxyNote}
\mbox{\Hypertarget{class_ogre_1_1_pixel_util_afbd54e9abc204019624bf99bc8cdb3c1}\label{class_ogre_1_1_pixel_util_afbd54e9abc204019624bf99bc8cdb3c1}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!get\+Bit\+Shifts@{get\+Bit\+Shifts}}
\index{get\+Bit\+Shifts@{get\+Bit\+Shifts}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{get\+Bit\+Shifts()}{getBitShifts()}}
{\footnotesize\ttfamily static void Ogre\+::\+Pixel\+Util\+::get\+Bit\+Shifts (\begin{DoxyParamCaption}\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{format,  }\item[{unsigned char}]{rgba\mbox{[}4\mbox{]} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Gives the bit shifts for R, G, B and A component. 

\begin{DoxyNote}{Note}
Only valid for native endian formats 
\end{DoxyNote}
\mbox{\Hypertarget{class_ogre_1_1_pixel_util_af74abffb573e5984070e354f6bba2f8e}\label{class_ogre_1_1_pixel_util_af74abffb573e5984070e354f6bba2f8e}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!get\+Format\+Name@{get\+Format\+Name}}
\index{get\+Format\+Name@{get\+Format\+Name}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{get\+Format\+Name()}{getFormatName()}}
{\footnotesize\ttfamily static const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}\& Ogre\+::\+Pixel\+Util\+::get\+Format\+Name (\begin{DoxyParamCaption}\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{srcformat }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Gets the name of an image format. 

\mbox{\Hypertarget{class_ogre_1_1_pixel_util_a2a9e6ac27e4a4cb2d890d322b3f12c8e}\label{class_ogre_1_1_pixel_util_a2a9e6ac27e4a4cb2d890d322b3f12c8e}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!is\+Accessible@{is\+Accessible}}
\index{is\+Accessible@{is\+Accessible}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{is\+Accessible()}{isAccessible()}}
{\footnotesize\ttfamily static bool Ogre\+::\+Pixel\+Util\+::is\+Accessible (\begin{DoxyParamCaption}\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{srcformat }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Returns whether the format can be packed or unpacked with the \hyperlink{class_ogre_1_1_pixel_util_a793a7ae2bb8edec89ab520958ac33f40}{pack\+Colour()} and \hyperlink{class_ogre_1_1_pixel_util_a9b90b16c6c5c8a9fefd42e06a1bd99dc}{unpack\+Colour()} functions. 

This is generally not true for compressed and depth formats as they are special. It can only be true for formats with a fixed element size. \begin{DoxyReturn}{Returns}
true if yes, otherwise false 
\end{DoxyReturn}
\mbox{\Hypertarget{class_ogre_1_1_pixel_util_a90ebf73b3830df2e83d529e60fd8c385}\label{class_ogre_1_1_pixel_util_a90ebf73b3830df2e83d529e60fd8c385}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!get\+Component\+Type@{get\+Component\+Type}}
\index{get\+Component\+Type@{get\+Component\+Type}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{get\+Component\+Type()}{getComponentType()}}
{\footnotesize\ttfamily static \hyperlink{group___image_gac8f59c884998d9f84d9ea4c66e4c29fe}{Pixel\+Component\+Type} Ogre\+::\+Pixel\+Util\+::get\+Component\+Type (\begin{DoxyParamCaption}\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{fmt }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Returns the component type for a certain pixel format. 

Returns P\+C\+T\+\_\+\+B\+Y\+TE in case there is no clear component type like with compressed formats. This is one of P\+C\+T\+\_\+\+B\+Y\+TE, P\+C\+T\+\_\+\+S\+H\+O\+RT, P\+C\+T\+\_\+\+F\+L\+O\+A\+T16, P\+C\+T\+\_\+\+F\+L\+O\+A\+T32. \mbox{\Hypertarget{class_ogre_1_1_pixel_util_ae81ba2514ca7f5a53c84bb515de2ade0}\label{class_ogre_1_1_pixel_util_ae81ba2514ca7f5a53c84bb515de2ade0}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!get\+Component\+Count@{get\+Component\+Count}}
\index{get\+Component\+Count@{get\+Component\+Count}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{get\+Component\+Count()}{getComponentCount()}}
{\footnotesize\ttfamily static size\+\_\+t Ogre\+::\+Pixel\+Util\+::get\+Component\+Count (\begin{DoxyParamCaption}\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{fmt }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Returns the component count for a certain pixel format. 

Returns 3(no alpha) or 4 (has alpha) in case there is no clear component type like with compressed formats. \mbox{\Hypertarget{class_ogre_1_1_pixel_util_a601fd16392331e7ddce6bcc455b5729d}\label{class_ogre_1_1_pixel_util_a601fd16392331e7ddce6bcc455b5729d}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!get\+Format\+From\+Name@{get\+Format\+From\+Name}}
\index{get\+Format\+From\+Name@{get\+Format\+From\+Name}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{get\+Format\+From\+Name()}{getFormatFromName()}}
{\footnotesize\ttfamily static \hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} Ogre\+::\+Pixel\+Util\+::get\+Format\+From\+Name (\begin{DoxyParamCaption}\item[{const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&}]{name,  }\item[{bool}]{accessible\+Only = {\ttfamily false},  }\item[{bool}]{case\+Sensitive = {\ttfamily false} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Gets the format from given name. 


\begin{DoxyParams}{Parameters}
{\em name} & The string of format name \\
\hline
{\em accessible\+Only} & If true, non-\/accessible format will treat as invalid format, otherwise, all supported format are valid. \\
\hline
{\em case\+Sensitive} & Should be set true if string match should use case sensitivity. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The format match the format name, or P\+F\+\_\+\+U\+N\+K\+N\+O\+WN if is invalid name. 
\end{DoxyReturn}
\mbox{\Hypertarget{class_ogre_1_1_pixel_util_a32443d01d6399f778fce913ca80b0eee}\label{class_ogre_1_1_pixel_util_a32443d01d6399f778fce913ca80b0eee}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!get\+B\+N\+F\+Expression\+Of\+Pixel\+Formats@{get\+B\+N\+F\+Expression\+Of\+Pixel\+Formats}}
\index{get\+B\+N\+F\+Expression\+Of\+Pixel\+Formats@{get\+B\+N\+F\+Expression\+Of\+Pixel\+Formats}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{get\+B\+N\+F\+Expression\+Of\+Pixel\+Formats()}{getBNFExpressionOfPixelFormats()}}
{\footnotesize\ttfamily static \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} Ogre\+::\+Pixel\+Util\+::get\+B\+N\+F\+Expression\+Of\+Pixel\+Formats (\begin{DoxyParamCaption}\item[{bool}]{accessible\+Only = {\ttfamily false} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Gets the B\+NF expression of the pixel-\/formats. 

\begin{DoxyNote}{Note}
The string returned by this function is intended to be used as a B\+NF expression to work with Compiler2\+Pass. 
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em accessible\+Only} & If true, only accessible pixel format will take into account, otherwise all pixel formats list in Pixel\+Format enumeration will being returned. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A string contains the B\+NF expression. 
\end{DoxyReturn}
\mbox{\Hypertarget{class_ogre_1_1_pixel_util_ae127c3e6145af784e7d2d3734681a75a}\label{class_ogre_1_1_pixel_util_ae127c3e6145af784e7d2d3734681a75a}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!get\+Format\+For\+Bit\+Depths@{get\+Format\+For\+Bit\+Depths}}
\index{get\+Format\+For\+Bit\+Depths@{get\+Format\+For\+Bit\+Depths}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{get\+Format\+For\+Bit\+Depths()}{getFormatForBitDepths()}}
{\footnotesize\ttfamily static \hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} Ogre\+::\+Pixel\+Util\+::get\+Format\+For\+Bit\+Depths (\begin{DoxyParamCaption}\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{fmt,  }\item[{\hyperlink{namespace_ogre_af851e71354d841df7138f9877c6f5931}{ushort}}]{integer\+Bits,  }\item[{\hyperlink{namespace_ogre_af851e71354d841df7138f9877c6f5931}{ushort}}]{float\+Bits }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Returns the similar format but acoording with given bit depths. 


\begin{DoxyParams}{Parameters}
{\em fmt} & The original foamt. \\
\hline
{\em integer\+Bits} & Preferred bit depth (pixel bits) for integer pixel format. Available values\+: 0, 16 and 32, where 0 (the default) means as it is. \\
\hline
{\em float\+Bits} & Preferred bit depth (channel bits) for float pixel format. Available values\+: 0, 16 and 32, where 0 (the default) means as it is. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The format that similar original format with bit depth according with preferred bit depth, or original format if no conversion occurring. 
\end{DoxyReturn}
\mbox{\Hypertarget{class_ogre_1_1_pixel_util_a793a7ae2bb8edec89ab520958ac33f40}\label{class_ogre_1_1_pixel_util_a793a7ae2bb8edec89ab520958ac33f40}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!pack\+Colour@{pack\+Colour}}
\index{pack\+Colour@{pack\+Colour}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{pack\+Colour()}{packColour()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily static void Ogre\+::\+Pixel\+Util\+::pack\+Colour (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_colour_value}{Colour\+Value} \&}]{colour,  }\item[{const \hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{pf,  }\item[{void $\ast$}]{dest }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Pack a colour value to memory. 


\begin{DoxyParams}{Parameters}
{\em colour} & The colour \\
\hline
{\em pf} & Pixelformat in which to write the colour \\
\hline
{\em dest} & Destination memory location \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_pixel_util_af0658994fbf0337d455ac9aa74ee8084}\label{class_ogre_1_1_pixel_util_af0658994fbf0337d455ac9aa74ee8084}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!pack\+Colour@{pack\+Colour}}
\index{pack\+Colour@{pack\+Colour}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{pack\+Colour()}{packColour()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily static void Ogre\+::\+Pixel\+Util\+::pack\+Colour (\begin{DoxyParamCaption}\item[{const \hyperlink{namespace_ogre_a119732ea9d1e88bbddc47b4ac0fa21cb}{uint8}}]{r,  }\item[{const \hyperlink{namespace_ogre_a119732ea9d1e88bbddc47b4ac0fa21cb}{uint8}}]{g,  }\item[{const \hyperlink{namespace_ogre_a119732ea9d1e88bbddc47b4ac0fa21cb}{uint8}}]{b,  }\item[{const \hyperlink{namespace_ogre_a119732ea9d1e88bbddc47b4ac0fa21cb}{uint8}}]{a,  }\item[{const \hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{pf,  }\item[{void $\ast$}]{dest }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Pack a colour value to memory. 


\begin{DoxyParams}{Parameters}
{\em r,g,b,a} & The four colour components, range 0.\+0f to 1.\+0f (an exception to this case exists for floating point pixel formats, which don\textquotesingle{}t clamp to 0.\+0f..1.\+0f) \\
\hline
{\em pf} & Pixelformat in which to write the colour \\
\hline
{\em dest} & Destination memory location \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_pixel_util_a29490454e6327a0429d19533880f6e2c}\label{class_ogre_1_1_pixel_util_a29490454e6327a0429d19533880f6e2c}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!pack\+Colour@{pack\+Colour}}
\index{pack\+Colour@{pack\+Colour}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{pack\+Colour()}{packColour()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily static void Ogre\+::\+Pixel\+Util\+::pack\+Colour (\begin{DoxyParamCaption}\item[{const float}]{r,  }\item[{const float}]{g,  }\item[{const float}]{b,  }\item[{const float}]{a,  }\item[{const \hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{pf,  }\item[{void $\ast$}]{dest }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Pack a colour value to memory. 


\begin{DoxyParams}{Parameters}
{\em r,g,b,a} & The four colour components, range 0.\+0f to 1.\+0f (an exception to this case exists for floating point pixel formats, which don\textquotesingle{}t clamp to 0.\+0f..1.\+0f) \\
\hline
{\em pf} & Pixelformat in which to write the colour \\
\hline
{\em dest} & Destination memory location \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_pixel_util_a9b90b16c6c5c8a9fefd42e06a1bd99dc}\label{class_ogre_1_1_pixel_util_a9b90b16c6c5c8a9fefd42e06a1bd99dc}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!unpack\+Colour@{unpack\+Colour}}
\index{unpack\+Colour@{unpack\+Colour}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{unpack\+Colour()}{unpackColour()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily static void Ogre\+::\+Pixel\+Util\+::unpack\+Colour (\begin{DoxyParamCaption}\item[{\hyperlink{class_ogre_1_1_colour_value}{Colour\+Value} $\ast$}]{colour,  }\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{pf,  }\item[{const void $\ast$}]{src }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Unpack a colour value from memory. 


\begin{DoxyParams}{Parameters}
{\em colour} & The colour is returned here \\
\hline
{\em pf} & Pixelformat in which to read the colour \\
\hline
{\em src} & Source memory location \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_pixel_util_a6599a03e4d51ef96f373f47253e2b9e3}\label{class_ogre_1_1_pixel_util_a6599a03e4d51ef96f373f47253e2b9e3}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!unpack\+Colour@{unpack\+Colour}}
\index{unpack\+Colour@{unpack\+Colour}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{unpack\+Colour()}{unpackColour()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily static void Ogre\+::\+Pixel\+Util\+::unpack\+Colour (\begin{DoxyParamCaption}\item[{\hyperlink{namespace_ogre_a119732ea9d1e88bbddc47b4ac0fa21cb}{uint8} $\ast$}]{r,  }\item[{\hyperlink{namespace_ogre_a119732ea9d1e88bbddc47b4ac0fa21cb}{uint8} $\ast$}]{g,  }\item[{\hyperlink{namespace_ogre_a119732ea9d1e88bbddc47b4ac0fa21cb}{uint8} $\ast$}]{b,  }\item[{\hyperlink{namespace_ogre_a119732ea9d1e88bbddc47b4ac0fa21cb}{uint8} $\ast$}]{a,  }\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{pf,  }\item[{const void $\ast$}]{src }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Unpack a colour value from memory. 


\begin{DoxyParams}{Parameters}
{\em r} & The red channel is returned here (as byte) \\
\hline
{\em g} & The blue channel is returned here (as byte) \\
\hline
{\em b} & The green channel is returned here (as byte) \\
\hline
{\em a} & The alpha channel is returned here (as byte) \\
\hline
{\em pf} & Pixelformat in which to read the colour \\
\hline
{\em src} & Source memory location \\
\hline
\end{DoxyParams}
\begin{DoxyRemark}{Remarks}
This function returns the colour components in 8 bit precision, this will lose precision when coming from P\+F\+\_\+\+A2\+R10\+G10\+B10 or floating point formats. 
\end{DoxyRemark}
\mbox{\Hypertarget{class_ogre_1_1_pixel_util_ae1448ad9a222ed03918f2e94a057612c}\label{class_ogre_1_1_pixel_util_ae1448ad9a222ed03918f2e94a057612c}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!unpack\+Colour@{unpack\+Colour}}
\index{unpack\+Colour@{unpack\+Colour}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{unpack\+Colour()}{unpackColour()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily static void Ogre\+::\+Pixel\+Util\+::unpack\+Colour (\begin{DoxyParamCaption}\item[{float $\ast$}]{r,  }\item[{float $\ast$}]{g,  }\item[{float $\ast$}]{b,  }\item[{float $\ast$}]{a,  }\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{pf,  }\item[{const void $\ast$}]{src }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Unpack a colour value from memory. 


\begin{DoxyParams}{Parameters}
{\em r} & The red channel is returned here (as float) \\
\hline
{\em g} & The blue channel is returned here (as float) \\
\hline
{\em b} & The green channel is returned here (as float) \\
\hline
{\em a} & The alpha channel is returned here (as float) \\
\hline
{\em pf} & Pixelformat in which to read the colour \\
\hline
{\em src} & Source memory location \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_pixel_util_a0cae4443af5f8feb1c2f4f0905277c34}\label{class_ogre_1_1_pixel_util_a0cae4443af5f8feb1c2f4f0905277c34}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!bulk\+Pixel\+Conversion@{bulk\+Pixel\+Conversion}}
\index{bulk\+Pixel\+Conversion@{bulk\+Pixel\+Conversion}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{bulk\+Pixel\+Conversion()}{bulkPixelConversion()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily static void Ogre\+::\+Pixel\+Util\+::bulk\+Pixel\+Conversion (\begin{DoxyParamCaption}\item[{void $\ast$}]{src,  }\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{src\+Format,  }\item[{void $\ast$}]{dst,  }\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{dst\+Format,  }\item[{unsigned int}]{count }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Convert consecutive pixels from one format to another. 

No dithering or filtering is being done. Converting from R\+GB to luminance takes the R channel. In case the source and destination format match, just a copy is done. 
\begin{DoxyParams}{Parameters}
{\em src} & Pointer to source region \\
\hline
{\em src\+Format} & Pixel format of source region \\
\hline
{\em dst} & Pointer to destination region \\
\hline
{\em dst\+Format} & Pixel format of destination region \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_pixel_util_a9f6e459a0f92c0c8e6bf4f20ee3a771a}\label{class_ogre_1_1_pixel_util_a9f6e459a0f92c0c8e6bf4f20ee3a771a}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!bulk\+Pixel\+Conversion@{bulk\+Pixel\+Conversion}}
\index{bulk\+Pixel\+Conversion@{bulk\+Pixel\+Conversion}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{bulk\+Pixel\+Conversion()}{bulkPixelConversion()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily static void Ogre\+::\+Pixel\+Util\+::bulk\+Pixel\+Conversion (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_pixel_box}{Pixel\+Box} \&}]{src,  }\item[{const \hyperlink{class_ogre_1_1_pixel_box}{Pixel\+Box} \&}]{dst }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Convert pixels from one format to another. 

No dithering or filtering is being done. Converting from R\+GB to luminance takes the R channel. 
\begin{DoxyParams}{Parameters}
{\em src} & \hyperlink{class_ogre_1_1_pixel_box}{Pixel\+Box} containing the source pixels, pitches and format \\
\hline
{\em dst} & \hyperlink{class_ogre_1_1_pixel_box}{Pixel\+Box} containing the destination pixels, pitches and format \\
\hline
\end{DoxyParams}
\begin{DoxyRemark}{Remarks}
The source and destination boxes must have the same dimensions. In case the source and destination format match, a plain copy is done. 
\end{DoxyRemark}
\mbox{\Hypertarget{class_ogre_1_1_pixel_util_a3d8f29c8c1181ba98e22e342169970fd}\label{class_ogre_1_1_pixel_util_a3d8f29c8c1181ba98e22e342169970fd}} 
\index{Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}!bulk\+Pixel\+Vertical\+Flip@{bulk\+Pixel\+Vertical\+Flip}}
\index{bulk\+Pixel\+Vertical\+Flip@{bulk\+Pixel\+Vertical\+Flip}!Ogre\+::\+Pixel\+Util@{Ogre\+::\+Pixel\+Util}}
\subsubsection{\texorpdfstring{bulk\+Pixel\+Vertical\+Flip()}{bulkPixelVerticalFlip()}}
{\footnotesize\ttfamily static void Ogre\+::\+Pixel\+Util\+::bulk\+Pixel\+Vertical\+Flip (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_pixel_box}{Pixel\+Box} \&}]{box }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Flips pixels inplace in vertical direction. 


\begin{DoxyParams}{Parameters}
{\em box} & \hyperlink{class_ogre_1_1_pixel_box}{Pixel\+Box} containing pixels, pitches and format \\
\hline
\end{DoxyParams}
\begin{DoxyRemark}{Remarks}
Non consecutive pixel boxes are supported. 
\end{DoxyRemark}


The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\hyperlink{_ogre_pixel_format_8h}{Ogre\+Pixel\+Format.\+h}\end{DoxyCompactItemize}
