\hypertarget{group__Eet__File__Image__Cipher__Group}{\section{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 \hyperlink{group__Eet__File__Image__Group}{Image Store and Load} have alternative versions that accounts for ciphers to protect their content.  


\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} int \hyperlink{group__Eet__File__Image__Cipher__Group_ga32c48cbd5dfe3a6f5fc3cace1b83a879}{eet\+\_\+data\+\_\+image\+\_\+header\+\_\+read\+\_\+cipher} (\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, Eet\+\_\+\+Image\+\_\+\+Encoding $\ast$lossy)
\begin{DoxyCompactList}\small\item\em Read just the header data for an image and dont decode the pixels using a cipher. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void $\ast$ \hyperlink{group__Eet__File__Image__Cipher__Group_gab56ba9c7f727d611055df6f7e384f8e1}{eet\+\_\+data\+\_\+image\+\_\+read\+\_\+cipher} (\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, Eet\+\_\+\+Image\+\_\+\+Encoding $\ast$lossy)
\begin{DoxyCompactList}\small\item\em Read image data from the named key in the eet file using a cipher. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} int \hyperlink{group__Eet__File__Image__Cipher__Group_ga5a3e9c25254e023dd1ce4f47f6955c1f}{eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+surface\+\_\+cipher} (\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, Eet\+\_\+\+Image\+\_\+\+Encoding $\ast$lossy)
\begin{DoxyCompactList}\small\item\em Read image data from the named key in the eet file using a cipher. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} int \hyperlink{group__Eet__File__Image__Cipher__Group_ga69620a01c0239a1c3405f461525bf2fe}{eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+cspace\+\_\+surface\+\_\+cipher} (\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, Eet\+\_\+\+Colorspace cspace, int $\ast$alpha, int $\ast$comp, int $\ast$quality, Eet\+\_\+\+Image\+\_\+\+Encoding $\ast$lossy)
\begin{DoxyCompactList}\small\item\em Read image data from the named key in the eet file using a cipher. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} int \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, Eet\+\_\+\+Colorspace cspace, int $\ast$alpha, int $\ast$comp, int $\ast$quality, Eet\+\_\+\+Image\+\_\+\+Encoding $\ast$lossy)
\begin{DoxyCompactList}\small\item\em Read image data from the named key in the eet file using a cipher. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} int \hyperlink{group__Eet__File__Image__Cipher__Group_ga71bcbecdbb40470e722bdb0a5abfc1bb}{eet\+\_\+data\+\_\+image\+\_\+write\+\_\+cipher} (\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, Eet\+\_\+\+Image\+\_\+\+Encoding lossy)
\begin{DoxyCompactList}\small\item\em Write image data to the named key in an eet file using a cipher. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} int \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, Eet\+\_\+\+Image\+\_\+\+Encoding $\ast$lossy)
\begin{DoxyCompactList}\small\item\em Decode Image data header only to get information using a cipher. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void $\ast$ \hyperlink{group__Eet__File__Image__Cipher__Group_gad5ed35797beed83522844f64dc193048}{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, Eet\+\_\+\+Image\+\_\+\+Encoding $\ast$lossy)
\begin{DoxyCompactList}\small\item\em Decode Image data into pixel data using a cipher. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} int \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, Eet\+\_\+\+Image\+\_\+\+Encoding $\ast$lossy)
\begin{DoxyCompactList}\small\item\em Decode Image data into pixel data using a cipher. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void $\ast$ \hyperlink{group__Eet__File__Image__Cipher__Group_ga97289ef89e6a1d7863a8b87f54cc0399}{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, Eet\+\_\+\+Image\+\_\+\+Encoding lossy, int $\ast$size\+\_\+ret)
\begin{DoxyCompactList}\small\item\em Encode image data for storage or transmission using a cipher. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Most of the \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}
\hyperlink{group__Eet__Cipher__Group}{Cipher, Identity and Protection Mechanisms} 
\end{DoxySeeAlso}


\subsection{Function Documentation}
\hypertarget{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}}
\subsubsection[{eet\+\_\+data\+\_\+image\+\_\+header\+\_\+read\+\_\+cipher}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} int eet\+\_\+data\+\_\+image\+\_\+header\+\_\+read\+\_\+cipher (
\begin{DoxyParamCaption}
\item[{{\bf 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[{Eet\+\_\+\+Image\+\_\+\+Encoding $\ast$}]{lossy}
\end{DoxyParamCaption}
)}}\label{group__Eet__File__Image__Cipher__Group_ga32c48cbd5dfe3a6f5fc3cace1b83a879}


Read 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}
1 on successful decode, 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 1 indicating the header was read and decoded properly, or 0 on failure.

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


References eet\+\_\+data\+\_\+image\+\_\+header\+\_\+decode(), eet\+\_\+read\+\_\+cipher(), and eet\+\_\+read\+\_\+direct().



Referenced by eet\+\_\+data\+\_\+image\+\_\+colorspace\+\_\+get(), and eet\+\_\+data\+\_\+image\+\_\+header\+\_\+read().

\hypertarget{group__Eet__File__Image__Cipher__Group_gab56ba9c7f727d611055df6f7e384f8e1}{\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}}
\subsubsection[{eet\+\_\+data\+\_\+image\+\_\+read\+\_\+cipher}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} void$\ast$ eet\+\_\+data\+\_\+image\+\_\+read\+\_\+cipher (
\begin{DoxyParamCaption}
\item[{{\bf 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[{Eet\+\_\+\+Image\+\_\+\+Encoding $\ast$}]{lossy}
\end{DoxyParamCaption}
)}}\label{group__Eet__File__Image__Cipher__Group_gab56ba9c7f727d611055df6f7e384f8e1}


Read 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 N\+U\+L\+L is returned and the parameter values may not contain any sensible data.

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


References eet\+\_\+data\+\_\+image\+\_\+decode(), eet\+\_\+read\+\_\+cipher(), and eet\+\_\+read\+\_\+direct().



Referenced by eet\+\_\+data\+\_\+image\+\_\+read().

\hypertarget{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}}
\subsubsection[{eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+surface\+\_\+cipher}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} int eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+surface\+\_\+cipher (
\begin{DoxyParamCaption}
\item[{{\bf 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[{Eet\+\_\+\+Image\+\_\+\+Encoding $\ast$}]{lossy}
\end{DoxyParamCaption}
)}}\label{group__Eet__File__Image__Cipher__Group_ga5a3e9c25254e023dd1ce4f47f6955c1f}


Read 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}
1 on success, 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 E\+E\+T\+\_\+\+C\+O\+L\+O\+R\+S\+P\+A\+C\+E\+\_\+\+A\+R\+G\+B8888} 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}
\hyperlink{group__Eet__File__Image__Group_gab0ac3f0dd4bf6e690be0e8d2859868b6}{eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+surface()} 

\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 eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+cspace\+\_\+surface\+\_\+cipher().



Referenced by eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+surface().

\hypertarget{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}}
\subsubsection[{eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+cspace\+\_\+surface\+\_\+cipher}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} int eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+cspace\+\_\+surface\+\_\+cipher (
\begin{DoxyParamCaption}
\item[{{\bf 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[{Eet\+\_\+\+Colorspace}]{cspace, }
\item[{int $\ast$}]{alpha, }
\item[{int $\ast$}]{comp, }
\item[{int $\ast$}]{quality, }
\item[{Eet\+\_\+\+Image\+\_\+\+Encoding $\ast$}]{lossy}
\end{DoxyParamCaption}
)}}\label{group__Eet__File__Image__Cipher__Group_ga69620a01c0239a1c3405f461525bf2fe}


Read 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 bsurface. \\
\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}
1 on success, 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}
\hyperlink{group__Eet__File__Image__Group_gab0ac3f0dd4bf6e690be0e8d2859868b6}{eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+surface()} 

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

\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 eet\+\_\+data\+\_\+image\+\_\+decode\+\_\+to\+\_\+cspace\+\_\+surface\+\_\+cipher(), eet\+\_\+read\+\_\+cipher(), and eet\+\_\+read\+\_\+direct().



Referenced by eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+surface\+\_\+cipher().

\hypertarget{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}}
\subsubsection[{eet\+\_\+data\+\_\+image\+\_\+decode\+\_\+to\+\_\+cspace\+\_\+surface\+\_\+cipher}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} 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[{Eet\+\_\+\+Colorspace}]{cspace, }
\item[{int $\ast$}]{alpha, }
\item[{int $\ast$}]{comp, }
\item[{int $\ast$}]{quality, }
\item[{Eet\+\_\+\+Image\+\_\+\+Encoding $\ast$}]{lossy}
\end{DoxyParamCaption}
)}}\label{group__Eet__File__Image__Cipher__Group_ga5cbbcbc74f8f91267cd29b594b9cda8c}


Read 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 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}
1 on success, 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}
\hyperlink{group__Eet__File__Image__Group_gab0ac3f0dd4bf6e690be0e8d2859868b6}{eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+surface()} 

\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 eet\+\_\+data\+\_\+image\+\_\+header\+\_\+decode().



Referenced by eet\+\_\+data\+\_\+image\+\_\+decode\+\_\+to\+\_\+surface\+\_\+cipher(), and eet\+\_\+data\+\_\+image\+\_\+read\+\_\+to\+\_\+cspace\+\_\+surface\+\_\+cipher().

\hypertarget{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}}
\subsubsection[{eet\+\_\+data\+\_\+image\+\_\+write\+\_\+cipher}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} int eet\+\_\+data\+\_\+image\+\_\+write\+\_\+cipher (
\begin{DoxyParamCaption}
\item[{{\bf 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[{Eet\+\_\+\+Image\+\_\+\+Encoding}]{lossy}
\end{DoxyParamCaption}
)}}\label{group__Eet__File__Image__Cipher__Group_ga71bcbecdbb40470e722bdb0a5abfc1bb}


Write 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}
\hyperlink{group__Eet__File__Image__Group_ga793af643214aaaf0404b1c948c648e13}{eet\+\_\+data\+\_\+image\+\_\+write()}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+0.\+0 
\end{DoxySince}


References eet\+\_\+data\+\_\+image\+\_\+encode(), and eet\+\_\+write\+\_\+cipher().



Referenced by eet\+\_\+data\+\_\+image\+\_\+write().

\hypertarget{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}}
\subsubsection[{eet\+\_\+data\+\_\+image\+\_\+header\+\_\+decode\+\_\+cipher}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} 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[{Eet\+\_\+\+Image\+\_\+\+Encoding $\ast$}]{lossy}
\end{DoxyParamCaption}
)}}\label{group__Eet__File__Image__Cipher__Group_gac7bbd94ae9d67e00fa39e275a9935b3c}


Decode 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}
1 on success, 0 on failure.
\end{DoxyReturn}
This function takes encoded pixel data and decodes it into raw R\+G\+B\+A 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}
\hyperlink{group__Eet__File__Image__Group_ga909c869cabe1a4785224b949cd3ca657}{eet\+\_\+data\+\_\+image\+\_\+header\+\_\+decode()}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+0.\+0 
\end{DoxySince}


References E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E, and E\+I\+N\+A\+\_\+\+T\+R\+U\+E.



Referenced by eet\+\_\+data\+\_\+image\+\_\+header\+\_\+decode().

\hypertarget{group__Eet__File__Image__Cipher__Group_gad5ed35797beed83522844f64dc193048}{\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}}
\subsubsection[{eet\+\_\+data\+\_\+image\+\_\+decode\+\_\+cipher}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} 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[{Eet\+\_\+\+Image\+\_\+\+Encoding $\ast$}]{lossy}
\end{DoxyParamCaption}
)}}\label{group__Eet__File__Image__Cipher__Group_gad5ed35797beed83522844f64dc193048}


Decode 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 R\+G\+B\+A 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 N\+U\+L\+L is returned and the parameter values may not contain any sensible data.

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


References eet\+\_\+data\+\_\+image\+\_\+header\+\_\+decode().



Referenced by eet\+\_\+data\+\_\+image\+\_\+decode().

\hypertarget{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}}
\subsubsection[{eet\+\_\+data\+\_\+image\+\_\+decode\+\_\+to\+\_\+surface\+\_\+cipher}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} 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[{Eet\+\_\+\+Image\+\_\+\+Encoding $\ast$}]{lossy}
\end{DoxyParamCaption}
)}}\label{group__Eet__File__Image__Cipher__Group_ga131db5528cb0b8381fbef91c899831ee}


Decode 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}
1 on success, 0 otherwise.
\end{DoxyReturn}
This function takes encoded pixel data and decodes it into raw R\+G\+B\+A 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}
\hyperlink{group__Eet__File__Image__Group_ga8c7e57f32570095018ef294a17dd1f2c}{eet\+\_\+data\+\_\+image\+\_\+decode\+\_\+to\+\_\+surface()}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+0.\+2 
\end{DoxySince}


References eet\+\_\+data\+\_\+image\+\_\+decode\+\_\+to\+\_\+cspace\+\_\+surface\+\_\+cipher().



Referenced by eet\+\_\+data\+\_\+image\+\_\+decode\+\_\+to\+\_\+surface().

\hypertarget{group__Eet__File__Image__Cipher__Group_ga97289ef89e6a1d7863a8b87f54cc0399}{\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}}
\subsubsection[{eet\+\_\+data\+\_\+image\+\_\+encode\+\_\+cipher}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} 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[{Eet\+\_\+\+Image\+\_\+\+Encoding}]{lossy, }
\item[{int $\ast$}]{size\+\_\+ret}
\end{DoxyParamCaption}
)}}\label{group__Eet__File__Image__Cipher__Group_ga97289ef89e6a1d7863a8b87f54cc0399}


Encode 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}
\hyperlink{group__Eet__File__Image__Group_ga2537c91d5a62dc14c7a006f3f36077fd}{eet\+\_\+data\+\_\+image\+\_\+encode()}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+0.\+0 
\end{DoxySince}


Referenced by eet\+\_\+data\+\_\+image\+\_\+encode().

