\hypertarget{group__Eet__File__Image__Cipher__Group}{}\doxysection{Image Store and Load using a Cipher}
\label{group__Eet__File__Image__Cipher__Group}\index{Image Store and Load using a Cipher@{Image Store and Load using a Cipher}}


Most of the \mbox{\hyperlink{group__Eet__File__Image__Group}{Image Store and Load}} have alternative versions that accounts for ciphers to protect their content.  


\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
EAPI int \mbox{\hyperlink{group__Eet__File__Image__Cipher__Group_ga32c48cbd5dfe3a6f5fc3cace1b83a879}{eet\+\_\+data\+\_\+image\+\_\+header\+\_\+read\+\_\+cipher}} (\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$ef, const char $\ast$name, const char $\ast$cipher\+\_\+key, unsigned int $\ast$w, unsigned int $\ast$h, int $\ast$alpha, int $\ast$compress, int $\ast$quality, \mbox{\hyperlink{group__Eet__File__Group_ga836650d7ec0a965edf51040e9b82bfeb}{Eet\+\_\+\+Image\+\_\+\+Encoding}} $\ast$lossy)
\begin{DoxyCompactList}\small\item\em Reads just the header data for an image and dont decode the pixels using a cipher. \end{DoxyCompactList}\item 
EAPI void $\ast$ \mbox{\hyperlink{group__Eet__File__Image__Cipher__Group_ga063a09e2d7b5b03d7e78c2936b1e336e}{eet\+\_\+data\+\_\+image\+\_\+read\+\_\+cipher}} (\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$ef, const char $\ast$name, const char $\ast$cipher\+\_\+key, unsigned int $\ast$w, unsigned int $\ast$h, int $\ast$alpha, int $\ast$compress, int $\ast$quality, \mbox{\hyperlink{group__Eet__File__Group_ga836650d7ec0a965edf51040e9b82bfeb}{Eet\+\_\+\+Image\+\_\+\+Encoding}} $\ast$lossy)
\begin{DoxyCompactList}\small\item\em Reads image data from the named key in the eet file using a cipher. \end{DoxyCompactList}\item 
EAPI int \mbox{\hyperlink{group__Eet__File__Image__Cipher__Group_ga5a3e9c25254e023dd1ce4f47f6955c1f}{eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+surface\+\_\+cipher}} (\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$ef, const char $\ast$name, const char $\ast$cipher\+\_\+key, unsigned int src\+\_\+x, unsigned int src\+\_\+y, unsigned int $\ast$d, unsigned int w, unsigned int h, unsigned int row\+\_\+stride, int $\ast$alpha, int $\ast$compress, int $\ast$quality, \mbox{\hyperlink{group__Eet__File__Group_ga836650d7ec0a965edf51040e9b82bfeb}{Eet\+\_\+\+Image\+\_\+\+Encoding}} $\ast$lossy)
\begin{DoxyCompactList}\small\item\em Reads image data from the named key in the eet file using a cipher. \end{DoxyCompactList}\item 
EAPI int \mbox{\hyperlink{group__Eet__File__Image__Cipher__Group_ga69620a01c0239a1c3405f461525bf2fe}{eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+cspace\+\_\+surface\+\_\+cipher}} (\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$ef, const char $\ast$name, const char $\ast$cipher\+\_\+key, unsigned int src\+\_\+x, unsigned int src\+\_\+y, unsigned int $\ast$d, unsigned int w, unsigned int h, unsigned int row\+\_\+stride, \mbox{\hyperlink{group__Eet__File__Group_ga4efad323325b6ad0d525849eb402b067}{Eet\+\_\+\+Colorspace}} cspace, int $\ast$alpha, int $\ast$comp, int $\ast$quality, \mbox{\hyperlink{group__Eet__File__Group_ga836650d7ec0a965edf51040e9b82bfeb}{Eet\+\_\+\+Image\+\_\+\+Encoding}} $\ast$lossy)
\begin{DoxyCompactList}\small\item\em Reads image data from the named key in the eet file using a cipher. \end{DoxyCompactList}\item 
EAPI int \mbox{\hyperlink{group__Eet__File__Image__Cipher__Group_ga5cbbcbc74f8f91267cd29b594b9cda8c}{eet\+\_\+data\+\_\+image\+\_\+decode\+\_\+to\+\_\+cspace\+\_\+surface\+\_\+cipher}} (const void $\ast$data, const char $\ast$cipher\+\_\+key, int size, unsigned int src\+\_\+x, unsigned int src\+\_\+y, unsigned int $\ast$d, unsigned int w, unsigned int h, unsigned int row\+\_\+stride, \mbox{\hyperlink{group__Eet__File__Group_ga4efad323325b6ad0d525849eb402b067}{Eet\+\_\+\+Colorspace}} cspace, int $\ast$alpha, int $\ast$comp, int $\ast$quality, \mbox{\hyperlink{group__Eet__File__Group_ga836650d7ec0a965edf51040e9b82bfeb}{Eet\+\_\+\+Image\+\_\+\+Encoding}} $\ast$lossy)
\begin{DoxyCompactList}\small\item\em Reads image data from the named key in the eet file using a cipher. \end{DoxyCompactList}\item 
EAPI int \mbox{\hyperlink{group__Eet__File__Image__Cipher__Group_ga71bcbecdbb40470e722bdb0a5abfc1bb}{eet\+\_\+data\+\_\+image\+\_\+write\+\_\+cipher}} (\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$ef, const char $\ast$name, const char $\ast$cipher\+\_\+key, const void $\ast$data, unsigned int w, unsigned int h, int alpha, int compress, int quality, \mbox{\hyperlink{group__Eet__File__Group_ga836650d7ec0a965edf51040e9b82bfeb}{Eet\+\_\+\+Image\+\_\+\+Encoding}} lossy)
\begin{DoxyCompactList}\small\item\em Writes image data to the named key in an eet file using a cipher. \end{DoxyCompactList}\item 
EAPI int \mbox{\hyperlink{group__Eet__File__Image__Cipher__Group_gac7bbd94ae9d67e00fa39e275a9935b3c}{eet\+\_\+data\+\_\+image\+\_\+header\+\_\+decode\+\_\+cipher}} (const void $\ast$data, const char $\ast$cipher\+\_\+key, int size, unsigned int $\ast$w, unsigned int $\ast$h, int $\ast$alpha, int $\ast$compress, int $\ast$quality, \mbox{\hyperlink{group__Eet__File__Group_ga836650d7ec0a965edf51040e9b82bfeb}{Eet\+\_\+\+Image\+\_\+\+Encoding}} $\ast$lossy)
\begin{DoxyCompactList}\small\item\em Decodes Image data header only to get information using a cipher. \end{DoxyCompactList}\item 
EAPI void $\ast$ \mbox{\hyperlink{group__Eet__File__Image__Cipher__Group_ga117f06856c95a6e41838c31899451a37}{eet\+\_\+data\+\_\+image\+\_\+decode\+\_\+cipher}} (const void $\ast$data, const char $\ast$cipher\+\_\+key, int size, unsigned int $\ast$w, unsigned int $\ast$h, int $\ast$alpha, int $\ast$compress, int $\ast$quality, \mbox{\hyperlink{group__Eet__File__Group_ga836650d7ec0a965edf51040e9b82bfeb}{Eet\+\_\+\+Image\+\_\+\+Encoding}} $\ast$lossy)
\begin{DoxyCompactList}\small\item\em Decodes Image data into pixel data using a cipher. \end{DoxyCompactList}\item 
EAPI int \mbox{\hyperlink{group__Eet__File__Image__Cipher__Group_ga131db5528cb0b8381fbef91c899831ee}{eet\+\_\+data\+\_\+image\+\_\+decode\+\_\+to\+\_\+surface\+\_\+cipher}} (const void $\ast$data, const char $\ast$cipher\+\_\+key, int size, unsigned int src\+\_\+x, unsigned int src\+\_\+y, unsigned int $\ast$d, unsigned int w, unsigned int h, unsigned int row\+\_\+stride, int $\ast$alpha, int $\ast$compress, int $\ast$quality, \mbox{\hyperlink{group__Eet__File__Group_ga836650d7ec0a965edf51040e9b82bfeb}{Eet\+\_\+\+Image\+\_\+\+Encoding}} $\ast$lossy)
\begin{DoxyCompactList}\small\item\em Decodes Image data into pixel data using a cipher. \end{DoxyCompactList}\item 
EAPI void $\ast$ \mbox{\hyperlink{group__Eet__File__Image__Cipher__Group_ga94909c0b7880e98883850555cdbfc8be}{eet\+\_\+data\+\_\+image\+\_\+encode\+\_\+cipher}} (const void $\ast$data, const char $\ast$cipher\+\_\+key, unsigned int w, unsigned int h, int alpha, int compress, int quality, \mbox{\hyperlink{group__Eet__File__Group_ga836650d7ec0a965edf51040e9b82bfeb}{Eet\+\_\+\+Image\+\_\+\+Encoding}} lossy, int $\ast$size\+\_\+ret)
\begin{DoxyCompactList}\small\item\em Encodes image data for storage or transmission using a cipher. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Most of the \mbox{\hyperlink{group__Eet__File__Image__Group}{Image Store and Load}} have alternative versions that accounts for ciphers to protect their content. 

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eet__Cipher__Group}{Cipher, Identity and Protection Mechanisms}} 
\end{DoxySeeAlso}


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__Eet__File__Image__Cipher__Group_ga32c48cbd5dfe3a6f5fc3cace1b83a879}\label{group__Eet__File__Image__Cipher__Group_ga32c48cbd5dfe3a6f5fc3cace1b83a879}} 
\index{Image Store and Load using a Cipher@{Image Store and Load using a Cipher}!eet\_data\_image\_header\_read\_cipher@{eet\_data\_image\_header\_read\_cipher}}
\index{eet\_data\_image\_header\_read\_cipher@{eet\_data\_image\_header\_read\_cipher}!Image Store and Load using a Cipher@{Image Store and Load using a Cipher}}
\doxysubsubsection{\texorpdfstring{eet\_data\_image\_header\_read\_cipher()}{eet\_data\_image\_header\_read\_cipher()}}
{\footnotesize\ttfamily EAPI int eet\+\_\+data\+\_\+image\+\_\+header\+\_\+read\+\_\+cipher (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$}]{ef,  }\item[{const char $\ast$}]{name,  }\item[{const char $\ast$}]{cipher\+\_\+key,  }\item[{unsigned int $\ast$}]{w,  }\item[{unsigned int $\ast$}]{h,  }\item[{int $\ast$}]{alpha,  }\item[{int $\ast$}]{compress,  }\item[{int $\ast$}]{quality,  }\item[{\mbox{\hyperlink{group__Eet__File__Group_ga836650d7ec0a965edf51040e9b82bfeb}{Eet\+\_\+\+Image\+\_\+\+Encoding}} $\ast$}]{lossy }\end{DoxyParamCaption})}



Reads just the header data for an image and dont decode the pixels using a cipher. 


\begin{DoxyParams}{Parameters}
{\em ef} & A valid eet file handle opened for reading. \\
\hline
{\em name} & Name of the entry. eg\+: \char`\"{}/base/file\+\_\+i\+\_\+want\char`\"{}. \\
\hline
{\em cipher\+\_\+key} & The key to use as cipher. \\
\hline
{\em w} & A pointer to the unsigned int to hold the width in pixels. \\
\hline
{\em h} & A pointer to the unsigned int to hold the height in pixels. \\
\hline
{\em alpha} & A pointer to the int to hold the alpha flag. \\
\hline
{\em compress} & A pointer to the int to hold the compression amount. \\
\hline
{\em quality} & A pointer to the int to hold the quality amount. \\
\hline
{\em lossy} & A pointer to the int to hold the lossiness flag. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily 1} on successful decode, {\ttfamily 0} otherwise
\end{DoxyReturn}
This function reads an image from an eet file stored under the named key in the eet file and return a pointer to the decompressed pixel data.

The other parameters of the image (width, height etc.) are placed into the values pointed to (they must be supplied). The pixel data is a linear array of pixels starting from the top-\/left of the image scanning row by row from left to right. Each pixel is a 32bit value, with the high byte being the alpha channel, the next being red, then green, and the low byte being blue. The width and height are measured in pixels and will be greater than 0 when returned. The alpha flag is either 0 or 1. 0 denotes that the alpha channel is not used. 1 denotes that it is significant. Compress is filled with the compression value/amount the image was stored with. The quality value is filled with the quality encoding of the image file (0 -\/ 100). The lossy flags is either 0 or 1 as to if the image was encoded lossily or not.

On success the function returns {\ttfamily 1} indicating the header was read and decoded properly, or {\ttfamily 0} on failure.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eet__File__Image__Group_gaa0e884cb39877ca363aaadabcda87dd5}{eet\+\_\+data\+\_\+image\+\_\+header\+\_\+read()}}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+0.\+0 
\end{DoxySince}


References \mbox{\hyperlink{group__Eet__File__Image__Group_ga909c869cabe1a4785224b949cd3ca657}{eet\+\_\+data\+\_\+image\+\_\+header\+\_\+decode()}}, \mbox{\hyperlink{group__Eet__File__Cipher__Group_gac6d14b588c7e192dc621f466749f3177}{eet\+\_\+read\+\_\+cipher()}}, and \mbox{\hyperlink{group__Eet__File__Group_ga250ac882b4530dc8112b0c9517a5b44d}{eet\+\_\+read\+\_\+direct()}}.



Referenced by \mbox{\hyperlink{group__Eet__File__Image__Group_gaa0e884cb39877ca363aaadabcda87dd5}{eet\+\_\+data\+\_\+image\+\_\+header\+\_\+read()}}.

\mbox{\Hypertarget{group__Eet__File__Image__Cipher__Group_ga063a09e2d7b5b03d7e78c2936b1e336e}\label{group__Eet__File__Image__Cipher__Group_ga063a09e2d7b5b03d7e78c2936b1e336e}} 
\index{Image Store and Load using a Cipher@{Image Store and Load using a Cipher}!eet\_data\_image\_read\_cipher@{eet\_data\_image\_read\_cipher}}
\index{eet\_data\_image\_read\_cipher@{eet\_data\_image\_read\_cipher}!Image Store and Load using a Cipher@{Image Store and Load using a Cipher}}
\doxysubsubsection{\texorpdfstring{eet\_data\_image\_read\_cipher()}{eet\_data\_image\_read\_cipher()}}
{\footnotesize\ttfamily EAPI void $\ast$ eet\+\_\+data\+\_\+image\+\_\+read\+\_\+cipher (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$}]{ef,  }\item[{const char $\ast$}]{name,  }\item[{const char $\ast$}]{cipher\+\_\+key,  }\item[{unsigned int $\ast$}]{w,  }\item[{unsigned int $\ast$}]{h,  }\item[{int $\ast$}]{alpha,  }\item[{int $\ast$}]{compress,  }\item[{int $\ast$}]{quality,  }\item[{\mbox{\hyperlink{group__Eet__File__Group_ga836650d7ec0a965edf51040e9b82bfeb}{Eet\+\_\+\+Image\+\_\+\+Encoding}} $\ast$}]{lossy }\end{DoxyParamCaption})}



Reads image data from the named key in the eet file using a cipher. 


\begin{DoxyParams}{Parameters}
{\em ef} & A valid eet file handle opened for reading. \\
\hline
{\em name} & Name of the entry. eg\+: \char`\"{}/base/file\+\_\+i\+\_\+want\char`\"{}. \\
\hline
{\em cipher\+\_\+key} & The key to use as cipher. \\
\hline
{\em w} & A pointer to the unsigned int to hold the width in pixels. \\
\hline
{\em h} & A pointer to the unsigned int to hold the height in pixels. \\
\hline
{\em alpha} & A pointer to the int to hold the alpha flag. \\
\hline
{\em compress} & A pointer to the int to hold the compression amount. \\
\hline
{\em quality} & A pointer to the int to hold the quality amount. \\
\hline
{\em lossy} & A pointer to the int to hold the lossiness flag. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The image pixel data decoded
\end{DoxyReturn}
This function reads an image from an eet file stored under the named key in the eet file and return a pointer to the decompressed pixel data.

The other parameters of the image (width, height etc.) are placed into the values pointed to (they must be supplied). The pixel data is a linear array of pixels starting from the top-\/left of the image scanning row by row from left to right. Each pixel is a 32bit value, with the high byte being the alpha channel, the next being red, then green, and the low byte being blue. The width and height are measured in pixels and will be greater than 0 when returned. The alpha flag is either 0 or 1. 0 denotes that the alpha channel is not used. 1 denotes that it is significant. Compress is filled with the compression value/amount the image was stored with. The quality value is filled with the quality encoding of the image file (0 -\/ 100). The lossy flags is either 0 or 1 as to if the image was encoded lossily or not.

On success the function returns a pointer to the image data decoded. The calling application is responsible for calling free() on the image data when it is done with it. On failure NULL is returned and the parameter values may not contain any sensible data.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eet__File__Image__Group_gaf9a1d48351f16959aad4b21dfd056791}{eet\+\_\+data\+\_\+image\+\_\+read()}}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+0.\+0 
\end{DoxySince}


References \mbox{\hyperlink{group__Eet__File__Image__Group_gac2c0c2bf6d0dbbe4516c79953b65fc63}{eet\+\_\+data\+\_\+image\+\_\+decode()}}, \mbox{\hyperlink{group__Eet__File__Cipher__Group_gac6d14b588c7e192dc621f466749f3177}{eet\+\_\+read\+\_\+cipher()}}, and \mbox{\hyperlink{group__Eet__File__Group_ga250ac882b4530dc8112b0c9517a5b44d}{eet\+\_\+read\+\_\+direct()}}.



Referenced by \mbox{\hyperlink{group__Eet__File__Image__Group_gaf9a1d48351f16959aad4b21dfd056791}{eet\+\_\+data\+\_\+image\+\_\+read()}}.

\mbox{\Hypertarget{group__Eet__File__Image__Cipher__Group_ga5a3e9c25254e023dd1ce4f47f6955c1f}\label{group__Eet__File__Image__Cipher__Group_ga5a3e9c25254e023dd1ce4f47f6955c1f}} 
\index{Image Store and Load using a Cipher@{Image Store and Load using a Cipher}!eet\_data\_image\_read\_to\_surface\_cipher@{eet\_data\_image\_read\_to\_surface\_cipher}}
\index{eet\_data\_image\_read\_to\_surface\_cipher@{eet\_data\_image\_read\_to\_surface\_cipher}!Image Store and Load using a Cipher@{Image Store and Load using a Cipher}}
\doxysubsubsection{\texorpdfstring{eet\_data\_image\_read\_to\_surface\_cipher()}{eet\_data\_image\_read\_to\_surface\_cipher()}}
{\footnotesize\ttfamily EAPI int eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+surface\+\_\+cipher (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$}]{ef,  }\item[{const char $\ast$}]{name,  }\item[{const char $\ast$}]{cipher\+\_\+key,  }\item[{unsigned int}]{src\+\_\+x,  }\item[{unsigned int}]{src\+\_\+y,  }\item[{unsigned int $\ast$}]{d,  }\item[{unsigned int}]{w,  }\item[{unsigned int}]{h,  }\item[{unsigned int}]{row\+\_\+stride,  }\item[{int $\ast$}]{alpha,  }\item[{int $\ast$}]{compress,  }\item[{int $\ast$}]{quality,  }\item[{\mbox{\hyperlink{group__Eet__File__Group_ga836650d7ec0a965edf51040e9b82bfeb}{Eet\+\_\+\+Image\+\_\+\+Encoding}} $\ast$}]{lossy }\end{DoxyParamCaption})}



Reads image data from the named key in the eet file using a cipher. 


\begin{DoxyParams}{Parameters}
{\em ef} & A valid eet file handle opened for reading. \\
\hline
{\em name} & Name of the entry. eg\+: \char`\"{}/base/file\+\_\+i\+\_\+want\char`\"{}. \\
\hline
{\em cipher\+\_\+key} & The key to use as cipher. \\
\hline
{\em src\+\_\+x} & The starting x coordinate from where to dump the stream. \\
\hline
{\em src\+\_\+y} & The starting y coordinate from where to dump the stream. \\
\hline
{\em d} & A pointer to the pixel surface. \\
\hline
{\em w} & The expected width in pixels of the pixel surface to decode. \\
\hline
{\em h} & The expected height in pixels of the pixel surface to decode. \\
\hline
{\em row\+\_\+stride} & The length of a pixels line in the destination surface. \\
\hline
{\em alpha} & A pointer to the int to hold the alpha flag. \\
\hline
{\em compress} & A pointer to the int to hold the compression amount. \\
\hline
{\em quality} & A pointer to the int to hold the quality amount. \\
\hline
{\em lossy} & A pointer to the int to hold the lossiness flag. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily 1} on success, {\ttfamily 0} otherwise.
\end{DoxyReturn}
This function reads an image from an eet file stored under the named key in the eet file and store the decompressed pixel data in the provided surface with an {\ttfamily EET\+\_\+\+COLORSPACE\+\_\+\+ARGB8888} colorspace.

The other parameters of the image (width, height etc.) are placed into the values pointed to (they must be supplied). The pixel data is a linear array of pixels starting from the top-\/left of the image scanning row by row from left to right. Each pixel is a 32bit value, with the high byte being the alpha channel, the next being red, then green, and the low byte being blue. The width and height are measured in pixels and will be greater than 0 when returned. The alpha flag is either 0 or 1. 0 denotes that the alpha channel is not used. 1 denotes that it is significant. Compress is filled with the compression value/amount the image was stored with. The quality value is filled with the quality encoding of the image file (0 -\/ 100). The lossy flags is either 0 or 1 as to if the image was encoded lossily or not.

On success the function returns 1, and 0 on failure. On failure the parameter values may not contain any sensible data.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eet__File__Image__Group_gab0ac3f0dd4bf6e690be0e8d2859868b6}{eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+surface()}} 

\mbox{\hyperlink{group__Eet__File__Image__Cipher__Group_ga5cbbcbc74f8f91267cd29b594b9cda8c}{eet\+\_\+data\+\_\+image\+\_\+decode\+\_\+to\+\_\+cspace\+\_\+surface\+\_\+cipher()}}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+0.\+2 
\end{DoxySince}


References \mbox{\hyperlink{group__Eet__File__Image__Cipher__Group_ga69620a01c0239a1c3405f461525bf2fe}{eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+cspace\+\_\+surface\+\_\+cipher()}}.



Referenced by \mbox{\hyperlink{group__Eet__File__Image__Group_gab0ac3f0dd4bf6e690be0e8d2859868b6}{eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+surface()}}.

\mbox{\Hypertarget{group__Eet__File__Image__Cipher__Group_ga69620a01c0239a1c3405f461525bf2fe}\label{group__Eet__File__Image__Cipher__Group_ga69620a01c0239a1c3405f461525bf2fe}} 
\index{Image Store and Load using a Cipher@{Image Store and Load using a Cipher}!eet\_data\_image\_read\_to\_cspace\_surface\_cipher@{eet\_data\_image\_read\_to\_cspace\_surface\_cipher}}
\index{eet\_data\_image\_read\_to\_cspace\_surface\_cipher@{eet\_data\_image\_read\_to\_cspace\_surface\_cipher}!Image Store and Load using a Cipher@{Image Store and Load using a Cipher}}
\doxysubsubsection{\texorpdfstring{eet\_data\_image\_read\_to\_cspace\_surface\_cipher()}{eet\_data\_image\_read\_to\_cspace\_surface\_cipher()}}
{\footnotesize\ttfamily EAPI int eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+cspace\+\_\+surface\+\_\+cipher (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$}]{ef,  }\item[{const char $\ast$}]{name,  }\item[{const char $\ast$}]{cipher\+\_\+key,  }\item[{unsigned int}]{src\+\_\+x,  }\item[{unsigned int}]{src\+\_\+y,  }\item[{unsigned int $\ast$}]{d,  }\item[{unsigned int}]{w,  }\item[{unsigned int}]{h,  }\item[{unsigned int}]{row\+\_\+stride,  }\item[{\mbox{\hyperlink{group__Eet__File__Group_ga4efad323325b6ad0d525849eb402b067}{Eet\+\_\+\+Colorspace}}}]{cspace,  }\item[{int $\ast$}]{alpha,  }\item[{int $\ast$}]{comp,  }\item[{int $\ast$}]{quality,  }\item[{\mbox{\hyperlink{group__Eet__File__Group_ga836650d7ec0a965edf51040e9b82bfeb}{Eet\+\_\+\+Image\+\_\+\+Encoding}} $\ast$}]{lossy }\end{DoxyParamCaption})}



Reads image data from the named key in the eet file using a cipher. 


\begin{DoxyParams}{Parameters}
{\em ef} & A valid eet file handle opened for reading. \\
\hline
{\em name} & Name of the entry. eg\+: \char`\"{}/base/file\+\_\+i\+\_\+want\char`\"{}. \\
\hline
{\em cipher\+\_\+key} & The key to use as cipher. \\
\hline
{\em src\+\_\+x} & The starting x coordinate from where to dump the stream. \\
\hline
{\em src\+\_\+y} & The starting y coordinate from where to dump the stream. \\
\hline
{\em d} & A pointer to the pixel surface. \\
\hline
{\em w} & The expected width in pixels of the pixel surface to decode. \\
\hline
{\em h} & The expected height in pixels of the pixel surface to decode. \\
\hline
{\em row\+\_\+stride} & The length of a pixels line in the destination surface. \\
\hline
{\em cspace} & The color space of the pixels surface. \\
\hline
{\em alpha} & A pointer to the int to hold the alpha flag. \\
\hline
{\em comp} & A pointer to the int to hold the compression amount. \\
\hline
{\em quality} & A pointer to the int to hold the quality amount. \\
\hline
{\em lossy} & A pointer to the int to hold the lossiness flag. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily 1} on success, {\ttfamily 0} otherwise.
\end{DoxyReturn}
This function reads an image from an eet file stored under the named key in the eet file and store the decompressed pixel data in the provided surface colorspace.

The other parameters of the image (width, height etc.) are placed into the values pointed to (they must be supplied). The pixel data is a linear array of pixels starting from the top-\/left of the image scanning row by row from left to right. Each pixel is a 32bit value, with the high byte being the alpha channel, the next being red, then green, and the low byte being blue. The width and height are measured in pixels and will be greater than 0 when returned. The alpha flag is either 0 or 1. 0 denotes that the alpha channel is not used. 1 denotes that it is significant. Compress is filled with the compression value/amount the image was stored with. The quality value is filled with the quality encoding of the image file (0 -\/ 100). The lossy flags is either 0 or 1 as to if the image was encoded lossily or not.

On success the function returns 1, and 0 on failure. On failure the parameter values may not contain any sensible data.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eet__File__Image__Group_gab0ac3f0dd4bf6e690be0e8d2859868b6}{eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+surface()}} 

\mbox{\hyperlink{group__Eet__File__Image__Cipher__Group_ga5cbbcbc74f8f91267cd29b594b9cda8c}{eet\+\_\+data\+\_\+image\+\_\+decode\+\_\+to\+\_\+cspace\+\_\+surface\+\_\+cipher()}} 

\mbox{\hyperlink{group__Eet__File__Image__Cipher__Group_ga5a3e9c25254e023dd1ce4f47f6955c1f}{eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+surface\+\_\+cipher()}}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+10.\+0 
\end{DoxySince}


References \mbox{\hyperlink{group__Eet__File__Image__Cipher__Group_ga5cbbcbc74f8f91267cd29b594b9cda8c}{eet\+\_\+data\+\_\+image\+\_\+decode\+\_\+to\+\_\+cspace\+\_\+surface\+\_\+cipher()}}, \mbox{\hyperlink{group__Eet__File__Cipher__Group_gac6d14b588c7e192dc621f466749f3177}{eet\+\_\+read\+\_\+cipher()}}, and \mbox{\hyperlink{group__Eet__File__Group_ga250ac882b4530dc8112b0c9517a5b44d}{eet\+\_\+read\+\_\+direct()}}.



Referenced by \mbox{\hyperlink{group__Eet__File__Image__Cipher__Group_ga5a3e9c25254e023dd1ce4f47f6955c1f}{eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+surface\+\_\+cipher()}}.

\mbox{\Hypertarget{group__Eet__File__Image__Cipher__Group_ga5cbbcbc74f8f91267cd29b594b9cda8c}\label{group__Eet__File__Image__Cipher__Group_ga5cbbcbc74f8f91267cd29b594b9cda8c}} 
\index{Image Store and Load using a Cipher@{Image Store and Load using a Cipher}!eet\_data\_image\_decode\_to\_cspace\_surface\_cipher@{eet\_data\_image\_decode\_to\_cspace\_surface\_cipher}}
\index{eet\_data\_image\_decode\_to\_cspace\_surface\_cipher@{eet\_data\_image\_decode\_to\_cspace\_surface\_cipher}!Image Store and Load using a Cipher@{Image Store and Load using a Cipher}}
\doxysubsubsection{\texorpdfstring{eet\_data\_image\_decode\_to\_cspace\_surface\_cipher()}{eet\_data\_image\_decode\_to\_cspace\_surface\_cipher()}}
{\footnotesize\ttfamily EAPI int eet\+\_\+data\+\_\+image\+\_\+decode\+\_\+to\+\_\+cspace\+\_\+surface\+\_\+cipher (\begin{DoxyParamCaption}\item[{const void $\ast$}]{data,  }\item[{const char $\ast$}]{cipher\+\_\+key,  }\item[{int}]{size,  }\item[{unsigned int}]{src\+\_\+x,  }\item[{unsigned int}]{src\+\_\+y,  }\item[{unsigned int $\ast$}]{d,  }\item[{unsigned int}]{w,  }\item[{unsigned int}]{h,  }\item[{unsigned int}]{row\+\_\+stride,  }\item[{\mbox{\hyperlink{group__Eet__File__Group_ga4efad323325b6ad0d525849eb402b067}{Eet\+\_\+\+Colorspace}}}]{cspace,  }\item[{int $\ast$}]{alpha,  }\item[{int $\ast$}]{comp,  }\item[{int $\ast$}]{quality,  }\item[{\mbox{\hyperlink{group__Eet__File__Group_ga836650d7ec0a965edf51040e9b82bfeb}{Eet\+\_\+\+Image\+\_\+\+Encoding}} $\ast$}]{lossy }\end{DoxyParamCaption})}



Reads image data from the named key in the eet file using a cipher. 


\begin{DoxyParams}{Parameters}
{\em data} & The encoded pixel data. \\
\hline
{\em cipher\+\_\+key} & The key to use as cipher. \\
\hline
{\em size} & The size, in bytes, of the encoded pixel data. \\
\hline
{\em src\+\_\+x} & The starting x coordinate from where to dump the stream. \\
\hline
{\em src\+\_\+y} & The starting y coordinate from where to dump the stream. \\
\hline
{\em d} & A pointer to the pixel surface. \\
\hline
{\em w} & The expected width in pixels of the pixel surface to decode. \\
\hline
{\em h} & The expected height in pixels of the pixel surface to decode. \\
\hline
{\em row\+\_\+stride} & The length of a pixels line in the destination surface. \\
\hline
{\em cspace} & The color space of the pixel surface \\
\hline
{\em alpha} & A pointer to the int to hold the alpha flag. \\
\hline
{\em comp} & A pointer to the int to hold the compression amount. \\
\hline
{\em quality} & A pointer to the int to hold the quality amount. \\
\hline
{\em lossy} & A pointer to the int to hold the lossiness flag. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily 1} on success, {\ttfamily 0} otherwise.
\end{DoxyReturn}
This function reads an image from an eet file stored under the named key in the eet file and store the decompressed pixels in the specified color space inside the given surface.

The other parameters of the image (width, height etc.) are placed into the values pointed to (they must be supplied). The pixel data is a linear array of pixels starting from the top-\/left of the image scanning row by row from left to right. Each pixel is a 32bit value, with the high byte being the alpha channel, the next being red, then green, and the low byte being blue. The width and height are measured in pixels and will be greater than 0 when returned. The alpha flag is either 0 or 1. 0 denotes that the alpha channel is not used. 1 denotes that it is significant. Compress is filled with the compression value/amount the image was stored with. The quality value is filled with the quality encoding of the image file (0 -\/ 100). The lossy flags is either 0 or 1 as to if the image was encoded lossily or not.

On success the function returns 1, and 0 on failure. On failure the parameter values may not contain any sensible data.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eet__File__Image__Group_gab0ac3f0dd4bf6e690be0e8d2859868b6}{eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+surface()}} 

\mbox{\hyperlink{group__Eet__File__Image__Cipher__Group_ga5a3e9c25254e023dd1ce4f47f6955c1f}{eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+surface\+\_\+cipher()}}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+10.\+0 
\end{DoxySince}


Referenced by \mbox{\hyperlink{group__Eet__File__Image__Cipher__Group_ga131db5528cb0b8381fbef91c899831ee}{eet\+\_\+data\+\_\+image\+\_\+decode\+\_\+to\+\_\+surface\+\_\+cipher()}}, and \mbox{\hyperlink{group__Eet__File__Image__Cipher__Group_ga69620a01c0239a1c3405f461525bf2fe}{eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+cspace\+\_\+surface\+\_\+cipher()}}.

\mbox{\Hypertarget{group__Eet__File__Image__Cipher__Group_ga71bcbecdbb40470e722bdb0a5abfc1bb}\label{group__Eet__File__Image__Cipher__Group_ga71bcbecdbb40470e722bdb0a5abfc1bb}} 
\index{Image Store and Load using a Cipher@{Image Store and Load using a Cipher}!eet\_data\_image\_write\_cipher@{eet\_data\_image\_write\_cipher}}
\index{eet\_data\_image\_write\_cipher@{eet\_data\_image\_write\_cipher}!Image Store and Load using a Cipher@{Image Store and Load using a Cipher}}
\doxysubsubsection{\texorpdfstring{eet\_data\_image\_write\_cipher()}{eet\_data\_image\_write\_cipher()}}
{\footnotesize\ttfamily EAPI int eet\+\_\+data\+\_\+image\+\_\+write\+\_\+cipher (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$}]{ef,  }\item[{const char $\ast$}]{name,  }\item[{const char $\ast$}]{cipher\+\_\+key,  }\item[{const void $\ast$}]{data,  }\item[{unsigned int}]{w,  }\item[{unsigned int}]{h,  }\item[{int}]{alpha,  }\item[{int}]{compress,  }\item[{int}]{quality,  }\item[{\mbox{\hyperlink{group__Eet__File__Group_ga836650d7ec0a965edf51040e9b82bfeb}{Eet\+\_\+\+Image\+\_\+\+Encoding}}}]{lossy }\end{DoxyParamCaption})}



Writes image data to the named key in an eet file using a cipher. 


\begin{DoxyParams}{Parameters}
{\em ef} & A valid eet file handle opened for writing. \\
\hline
{\em name} & Name of the entry. eg\+: \char`\"{}/base/file\+\_\+i\+\_\+want\char`\"{}. \\
\hline
{\em cipher\+\_\+key} & The key to use as cipher. \\
\hline
{\em data} & A pointer to the image pixel data. \\
\hline
{\em w} & The width of the image in pixels. \\
\hline
{\em h} & The height of the image in pixels. \\
\hline
{\em alpha} & The alpha channel flag. \\
\hline
{\em compress} & The compression amount. \\
\hline
{\em quality} & The quality encoding amount. \\
\hline
{\em lossy} & The lossiness flag. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Success if the data was encoded and written or not.
\end{DoxyReturn}
This function takes image pixel data and encodes it in an eet file stored under the supplied name key, and returns how many bytes were actually written to encode the image data.

The data expected is the same format as returned by eet\+\_\+data\+\_\+image\+\_\+read. If this is not the case weird things may happen. Width and height must be between 1 and 8000 pixels. The alpha flags can be 0 or 1 (0 meaning the alpha values are not useful and 1 meaning they are). Compress can be from 0 to 9 (0 meaning no compression, 9 meaning full compression). This is only used if the image is not lossily encoded. Quality is used on lossy compression and should be a value from 0 to 100. The lossy flag can be 0 or 1. 0 means encode losslessly and 1 means to encode with image quality loss (but then have a much smaller encoding).

On success this function returns the number of bytes that were required to encode the image data, or on failure it returns 0.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eet__File__Image__Group_ga793af643214aaaf0404b1c948c648e13}{eet\+\_\+data\+\_\+image\+\_\+write()}}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+0.\+0 
\end{DoxySince}


References \mbox{\hyperlink{group__Eet__File__Image__Group_gad9996bd6bb8008ff7ebe76b7c323b52e}{eet\+\_\+data\+\_\+image\+\_\+encode()}}, and \mbox{\hyperlink{group__Eet__File__Cipher__Group_ga0c08a5881d6fd3474a8cbe03a445aff3}{eet\+\_\+write\+\_\+cipher()}}.



Referenced by \mbox{\hyperlink{group__Eet__File__Image__Group_ga793af643214aaaf0404b1c948c648e13}{eet\+\_\+data\+\_\+image\+\_\+write()}}.

\mbox{\Hypertarget{group__Eet__File__Image__Cipher__Group_gac7bbd94ae9d67e00fa39e275a9935b3c}\label{group__Eet__File__Image__Cipher__Group_gac7bbd94ae9d67e00fa39e275a9935b3c}} 
\index{Image Store and Load using a Cipher@{Image Store and Load using a Cipher}!eet\_data\_image\_header\_decode\_cipher@{eet\_data\_image\_header\_decode\_cipher}}
\index{eet\_data\_image\_header\_decode\_cipher@{eet\_data\_image\_header\_decode\_cipher}!Image Store and Load using a Cipher@{Image Store and Load using a Cipher}}
\doxysubsubsection{\texorpdfstring{eet\_data\_image\_header\_decode\_cipher()}{eet\_data\_image\_header\_decode\_cipher()}}
{\footnotesize\ttfamily EAPI int eet\+\_\+data\+\_\+image\+\_\+header\+\_\+decode\+\_\+cipher (\begin{DoxyParamCaption}\item[{const void $\ast$}]{data,  }\item[{const char $\ast$}]{cipher\+\_\+key,  }\item[{int}]{size,  }\item[{unsigned int $\ast$}]{w,  }\item[{unsigned int $\ast$}]{h,  }\item[{int $\ast$}]{alpha,  }\item[{int $\ast$}]{compress,  }\item[{int $\ast$}]{quality,  }\item[{\mbox{\hyperlink{group__Eet__File__Group_ga836650d7ec0a965edf51040e9b82bfeb}{Eet\+\_\+\+Image\+\_\+\+Encoding}} $\ast$}]{lossy }\end{DoxyParamCaption})}



Decodes Image data header only to get information using a cipher. 


\begin{DoxyParams}{Parameters}
{\em data} & The encoded pixel data. \\
\hline
{\em cipher\+\_\+key} & The key to use as cipher. \\
\hline
{\em size} & The size, in bytes, of the encoded pixel data. \\
\hline
{\em w} & A pointer to the unsigned int to hold the width in pixels. \\
\hline
{\em h} & A pointer to the unsigned int to hold the height in pixels. \\
\hline
{\em alpha} & A pointer to the int to hold the alpha flag. \\
\hline
{\em compress} & A pointer to the int to hold the compression amount. \\
\hline
{\em quality} & A pointer to the int to hold the quality amount. \\
\hline
{\em lossy} & A pointer to the int to hold the lossiness flag. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily 1} on success, {\ttfamily 0} on failure.
\end{DoxyReturn}
This function takes encoded pixel data and decodes it into raw RGBA pixels on success.

The other parameters of the image (width, height etc.) are placed into the values pointed to (they must be supplied). The pixel data is a linear array of pixels starting from the top-\/left of the image scanning row by row from left to right. Each pixel is a 32bit value, with the high byte being the alpha channel, the next being red, then green, and the low byte being blue. The width and height are measured in pixels and will be greater than 0 when returned. The alpha flag is either 0 or 1. 0 denotes that the alpha channel is not used. 1 denotes that it is significant. Compress is filled with the compression value/amount the image was stored with. The quality value is filled with the quality encoding of the image file (0 -\/ 100). The lossy flags is either 0 or 1 as to if the image was encoded lossily or not.

On success the function returns 1 indicating the header was read and decoded properly, or 0 on failure.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eet__File__Image__Group_ga909c869cabe1a4785224b949cd3ca657}{eet\+\_\+data\+\_\+image\+\_\+header\+\_\+decode()}}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+0.\+0 
\end{DoxySince}


Referenced by \mbox{\hyperlink{group__Eet__File__Image__Group_ga909c869cabe1a4785224b949cd3ca657}{eet\+\_\+data\+\_\+image\+\_\+header\+\_\+decode()}}.

\mbox{\Hypertarget{group__Eet__File__Image__Cipher__Group_ga117f06856c95a6e41838c31899451a37}\label{group__Eet__File__Image__Cipher__Group_ga117f06856c95a6e41838c31899451a37}} 
\index{Image Store and Load using a Cipher@{Image Store and Load using a Cipher}!eet\_data\_image\_decode\_cipher@{eet\_data\_image\_decode\_cipher}}
\index{eet\_data\_image\_decode\_cipher@{eet\_data\_image\_decode\_cipher}!Image Store and Load using a Cipher@{Image Store and Load using a Cipher}}
\doxysubsubsection{\texorpdfstring{eet\_data\_image\_decode\_cipher()}{eet\_data\_image\_decode\_cipher()}}
{\footnotesize\ttfamily EAPI void $\ast$ eet\+\_\+data\+\_\+image\+\_\+decode\+\_\+cipher (\begin{DoxyParamCaption}\item[{const void $\ast$}]{data,  }\item[{const char $\ast$}]{cipher\+\_\+key,  }\item[{int}]{size,  }\item[{unsigned int $\ast$}]{w,  }\item[{unsigned int $\ast$}]{h,  }\item[{int $\ast$}]{alpha,  }\item[{int $\ast$}]{compress,  }\item[{int $\ast$}]{quality,  }\item[{\mbox{\hyperlink{group__Eet__File__Group_ga836650d7ec0a965edf51040e9b82bfeb}{Eet\+\_\+\+Image\+\_\+\+Encoding}} $\ast$}]{lossy }\end{DoxyParamCaption})}



Decodes Image data into pixel data using a cipher. 


\begin{DoxyParams}{Parameters}
{\em data} & The encoded pixel data. \\
\hline
{\em cipher\+\_\+key} & The key to use as cipher. \\
\hline
{\em size} & The size, in bytes, of the encoded pixel data. \\
\hline
{\em w} & A pointer to the unsigned int to hold the width in pixels. \\
\hline
{\em h} & A pointer to the unsigned int to hold the height in pixels. \\
\hline
{\em alpha} & A pointer to the int to hold the alpha flag. \\
\hline
{\em compress} & A pointer to the int to hold the compression amount. \\
\hline
{\em quality} & A pointer to the int to hold the quality amount. \\
\hline
{\em lossy} & A pointer to the int to hold the lossiness flag. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The image pixel data decoded
\end{DoxyReturn}
This function takes encoded pixel data and decodes it into raw RGBA pixels on success.

The other parameters of the image (width, height etc.) are placed into the values pointed to (they must be supplied). The pixel data is a linear array of pixels starting from the top-\/left of the image scanning row by row from left to right. Each pixel is a 32bit value, with the high byte being the alpha channel, the next being red, then green, and the low byte being blue. The width and height are measured in pixels and will be greater than 0 when returned. The alpha flag is either 0 or 1. 0 denotes that the alpha channel is not used. 1 denotes that it is significant. Compress is filled with the compression value/amount the image was stored with. The quality value is filled with the quality encoding of the image file (0 -\/ 100). The lossy flags is either 0 or 1 as to if the image was encoded lossily or not.

On success the function returns a pointer to the image data decoded. The calling application is responsible for calling free() on the image data when it is done with it. On failure NULL is returned and the parameter values may not contain any sensible data.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eet__File__Image__Group_gac2c0c2bf6d0dbbe4516c79953b65fc63}{eet\+\_\+data\+\_\+image\+\_\+decode()}}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+0.\+0 
\end{DoxySince}


References \mbox{\hyperlink{group__Eet__File__Image__Group_ga909c869cabe1a4785224b949cd3ca657}{eet\+\_\+data\+\_\+image\+\_\+header\+\_\+decode()}}.



Referenced by \mbox{\hyperlink{group__Eet__File__Image__Group_gac2c0c2bf6d0dbbe4516c79953b65fc63}{eet\+\_\+data\+\_\+image\+\_\+decode()}}.

\mbox{\Hypertarget{group__Eet__File__Image__Cipher__Group_ga131db5528cb0b8381fbef91c899831ee}\label{group__Eet__File__Image__Cipher__Group_ga131db5528cb0b8381fbef91c899831ee}} 
\index{Image Store and Load using a Cipher@{Image Store and Load using a Cipher}!eet\_data\_image\_decode\_to\_surface\_cipher@{eet\_data\_image\_decode\_to\_surface\_cipher}}
\index{eet\_data\_image\_decode\_to\_surface\_cipher@{eet\_data\_image\_decode\_to\_surface\_cipher}!Image Store and Load using a Cipher@{Image Store and Load using a Cipher}}
\doxysubsubsection{\texorpdfstring{eet\_data\_image\_decode\_to\_surface\_cipher()}{eet\_data\_image\_decode\_to\_surface\_cipher()}}
{\footnotesize\ttfamily EAPI int eet\+\_\+data\+\_\+image\+\_\+decode\+\_\+to\+\_\+surface\+\_\+cipher (\begin{DoxyParamCaption}\item[{const void $\ast$}]{data,  }\item[{const char $\ast$}]{cipher\+\_\+key,  }\item[{int}]{size,  }\item[{unsigned int}]{src\+\_\+x,  }\item[{unsigned int}]{src\+\_\+y,  }\item[{unsigned int $\ast$}]{d,  }\item[{unsigned int}]{w,  }\item[{unsigned int}]{h,  }\item[{unsigned int}]{row\+\_\+stride,  }\item[{int $\ast$}]{alpha,  }\item[{int $\ast$}]{compress,  }\item[{int $\ast$}]{quality,  }\item[{\mbox{\hyperlink{group__Eet__File__Group_ga836650d7ec0a965edf51040e9b82bfeb}{Eet\+\_\+\+Image\+\_\+\+Encoding}} $\ast$}]{lossy }\end{DoxyParamCaption})}



Decodes Image data into pixel data using a cipher. 


\begin{DoxyParams}{Parameters}
{\em data} & The encoded pixel data. \\
\hline
{\em cipher\+\_\+key} & The key to use as cipher. \\
\hline
{\em size} & The size, in bytes, of the encoded pixel data. \\
\hline
{\em src\+\_\+x} & The starting x coordinate from where to dump the stream. \\
\hline
{\em src\+\_\+y} & The starting y coordinate from where to dump the stream. \\
\hline
{\em d} & A pointer to the pixel surface. \\
\hline
{\em w} & The expected width in pixels of the pixel surface to decode. \\
\hline
{\em h} & The expected height in pixels of the pixel surface to decode. \\
\hline
{\em row\+\_\+stride} & The length of a pixels line in the destination surface. \\
\hline
{\em alpha} & A pointer to the int to hold the alpha flag. \\
\hline
{\em compress} & A pointer to the int to hold the compression amount. \\
\hline
{\em quality} & A pointer to the int to hold the quality amount. \\
\hline
{\em lossy} & A pointer to the int to hold the lossiness flag. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily 1} on success, {\ttfamily 0} otherwise.
\end{DoxyReturn}
This function takes encoded pixel data and decodes it into raw RGBA pixels on success.

The other parameters of the image (alpha, compress etc.) are placed into the values pointed to (they must be supplied). The pixel data is a linear array of pixels starting from the top-\/left of the image scanning row by row from left to right. Each pixel is a 32bit value, with the high byte being the alpha channel, the next being red, then green, and the low byte being blue. The width and height are measured in pixels and will be greater than 0 when returned. The alpha flag is either 0 or 1. 0 denotes that the alpha channel is not used. 1 denotes that it is significant. Compress is filled with the compression value/amount the image was stored with. The quality value is filled with the quality encoding of the image file (0 -\/ 100). The lossy flags is either 0 or 1 as to if the image was encoded lossily or not.

On success the function returns 1, and 0 on failure. On failure the parameter values may not contain any sensible data.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eet__File__Image__Group_ga8c7e57f32570095018ef294a17dd1f2c}{eet\+\_\+data\+\_\+image\+\_\+decode\+\_\+to\+\_\+surface()}}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+0.\+2 
\end{DoxySince}


References \mbox{\hyperlink{group__Eet__File__Image__Cipher__Group_ga5cbbcbc74f8f91267cd29b594b9cda8c}{eet\+\_\+data\+\_\+image\+\_\+decode\+\_\+to\+\_\+cspace\+\_\+surface\+\_\+cipher()}}.



Referenced by \mbox{\hyperlink{group__Eet__File__Image__Group_ga8c7e57f32570095018ef294a17dd1f2c}{eet\+\_\+data\+\_\+image\+\_\+decode\+\_\+to\+\_\+surface()}}.

\mbox{\Hypertarget{group__Eet__File__Image__Cipher__Group_ga94909c0b7880e98883850555cdbfc8be}\label{group__Eet__File__Image__Cipher__Group_ga94909c0b7880e98883850555cdbfc8be}} 
\index{Image Store and Load using a Cipher@{Image Store and Load using a Cipher}!eet\_data\_image\_encode\_cipher@{eet\_data\_image\_encode\_cipher}}
\index{eet\_data\_image\_encode\_cipher@{eet\_data\_image\_encode\_cipher}!Image Store and Load using a Cipher@{Image Store and Load using a Cipher}}
\doxysubsubsection{\texorpdfstring{eet\_data\_image\_encode\_cipher()}{eet\_data\_image\_encode\_cipher()}}
{\footnotesize\ttfamily EAPI void $\ast$ eet\+\_\+data\+\_\+image\+\_\+encode\+\_\+cipher (\begin{DoxyParamCaption}\item[{const void $\ast$}]{data,  }\item[{const char $\ast$}]{cipher\+\_\+key,  }\item[{unsigned int}]{w,  }\item[{unsigned int}]{h,  }\item[{int}]{alpha,  }\item[{int}]{compress,  }\item[{int}]{quality,  }\item[{\mbox{\hyperlink{group__Eet__File__Group_ga836650d7ec0a965edf51040e9b82bfeb}{Eet\+\_\+\+Image\+\_\+\+Encoding}}}]{lossy,  }\item[{int $\ast$}]{size\+\_\+ret }\end{DoxyParamCaption})}



Encodes image data for storage or transmission using a cipher. 


\begin{DoxyParams}{Parameters}
{\em data} & A pointer to the image pixel data. \\
\hline
{\em cipher\+\_\+key} & The key to use as cipher. \\
\hline
{\em size\+\_\+ret} & A pointer to an int to hold the size of the returned data. \\
\hline
{\em w} & The width of the image in pixels. \\
\hline
{\em h} & The height of the image in pixels. \\
\hline
{\em alpha} & The alpha channel flag. \\
\hline
{\em compress} & The compression amount. \\
\hline
{\em quality} & The quality encoding amount. \\
\hline
{\em lossy} & The lossiness flag. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The encoded image data.
\end{DoxyReturn}
This function stakes image pixel data and encodes it with compression and possible loss of quality (as a trade off for size) for storage or transmission to another system.

The data expected is the same format as returned by eet\+\_\+data\+\_\+image\+\_\+read. If this is not the case weird things may happen. Width and height must be between 1 and 8000 pixels. The alpha flags can be 0 or 1 (0 meaning the alpha values are not useful and 1 meaning they are). Compress can be from 0 to 9 (0 meaning no compression, 9 meaning full compression). This is only used if the image is not lossily encoded. Quality is used on lossy compression and should be a value from 0 to 100. The lossy flag can be 0 or 1. 0 means encode losslessly and 1 means to encode with image quality loss (but then have a much smaller encoding).

On success this function returns a pointer to the encoded data that you can free with free() when no longer needed.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eet__File__Image__Group_gad9996bd6bb8008ff7ebe76b7c323b52e}{eet\+\_\+data\+\_\+image\+\_\+encode()}}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+0.\+0 
\end{DoxySince}


Referenced by \mbox{\hyperlink{group__Eet__File__Image__Group_gad9996bd6bb8008ff7ebe76b7c323b52e}{eet\+\_\+data\+\_\+image\+\_\+encode()}}.

