\hypertarget{image_8c}{
\section{image.c File Reference}
\label{image_8c}\index{image.c@{image.c}}
}
\subsection*{Functions}
\begin{CompactItemize}
\item 
unsigned int \hyperlink{image_8c_ddbbada1051b78058939a383c36187ae}{tocolor} (lua\_\-State $\ast$L, int a)
\item 
static void \hyperlink{image_8c_edd0fcd77f62ef3e5689e2c3f4b37b17}{imagetoimage} (int sx, int sy, int width, int height, OSL\_\-IMAGE $\ast$source, int dx, int dy, OSL\_\-IMAGE $\ast$destination)
\item 
\hyperlink{image_8c_08eafae0a81701ffc4008618c33217ce}{UserdataStubs} (Image, OSL\_\-IMAGE $\ast$)
\item 
static int \hyperlink{image_8c_104fc3827f35ec7e8c6b0e1f41067f5c}{Image\_\-blit} (lua\_\-State $\ast$L)
\item 
static int \hyperlink{image_8c_b9055332b7ce0d3c18d2ac94c04bebd1}{Image\_\-createEmpty} (lua\_\-State $\ast$L)
\item 
static int \hyperlink{image_8c_48e544c0bf9cd95b63c9dd6a5f0a18e0}{Image\_\-loadfrommemory} (lua\_\-State $\ast$L)
\item 
static void \hyperlink{image_8c_e0902849e67c4fc1df9e0a5bc9b839e2}{fillImageRect} (Color color, int x0, int y0, int width, int height, OSL\_\-IMAGE $\ast$image)
\item 
static int \hyperlink{image_8c_0960ec8d6d75c4ee8baa2a61d169ea43}{Image\_\-fillRect} (lua\_\-State $\ast$L)
\item 
static int \hyperlink{image_8c_e185825ad9d0a19f9a51e24520899f11}{Image\_\-unswizzle} (lua\_\-State $\ast$L)
\item 
static int \hyperlink{image_8c_0c5d3fc9d20cf9c11cec3a97ca245f9a}{Image\_\-swizzle} (lua\_\-State $\ast$L)
\item 
static int \hyperlink{image_8c_6c91cdf48a05c4fe12fc86d25071ca59}{Image\_\-drawLine} (lua\_\-State $\ast$L)
\item 
static int \hyperlink{image_8c_6d3bc5433258ccc00d31828bd4d8c9dd}{Image\_\-pixel} (lua\_\-State $\ast$L)
\item 
static int \hyperlink{image_8c_e51e70406630f87c198eab3eb3c1e1a6}{Image\_\-resize} (lua\_\-State $\ast$L)
\item 
static int \hyperlink{image_8c_1158cfdee9cfbaeddc34518dc8b8bcdd}{Image\_\-rotate} (lua\_\-State $\ast$L)
\item 
static int \hyperlink{image_8c_ce53d641673eb97b0189d5ad4a0c1ae6}{Image\_\-reset} (lua\_\-State $\ast$L)
\item 
static int \hyperlink{image_8c_5d7ff26d7f5fadbd7729d4c69857d850}{Image\_\-center} (lua\_\-State $\ast$L)
\item 
static int \hyperlink{image_8c_e8bdbeeda44d3884ea14fa36d54c237f}{Image\_\-width} (lua\_\-State $\ast$L)
\item 
static int \hyperlink{image_8c_f56bb70500e344941832525cd0377142}{Image\_\-height} (lua\_\-State $\ast$L)
\item 
static int \hyperlink{image_8c_90d6eaa406de4d1fb8d522a92154631b}{Image\_\-clear} (lua\_\-State $\ast$L)
\item 
static int \hyperlink{image_8c_f9e702ccbcc35fa86f8c20ec51cbe441}{Image\_\-getpixel} (lua\_\-State $\ast$L)
\item 
static int \hyperlink{image_8c_3fbcdcfa071024d303a58750e17495cb}{Image\_\-creatsprite} (lua\_\-State $\ast$L)
\item 
static int \hyperlink{image_8c_fff3ac1e94ec9f678514f31c14b455be}{Image\_\-free} (lua\_\-State $\ast$L)
\item 
static int \hyperlink{image_8c_bdc3a73395d49b9f2b9dec7b21465307}{Image\_\-tovram} (lua\_\-State $\ast$L)
\item 
static int \hyperlink{image_8c_959c078ad1170387587009dd2c7504a9}{Image\_\-toram} (lua\_\-State $\ast$L)
\item 
static int \hyperlink{image_8c_3c6b48273d08398dd0fcf1f2bcc5fdaa}{Image\_\-save} (lua\_\-State $\ast$L)
\item 
\hyperlink{image_8c_da1cd9463f9d6542c5fb48aaa76d9b32}{UserdataRegister} (Image, \hyperlink{image_8c_736ee56c38d79cb024a48d061c0d82c4}{Image\_\-methods}, \hyperlink{image_8c_5c2b590ca1926edfeea3dc4c49370402}{Image\_\-meta})
\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
static const luaL\_\-reg \hyperlink{image_8c_736ee56c38d79cb024a48d061c0d82c4}{Image\_\-methods} \mbox{[}$\,$\mbox{]}
\item 
static const luaL\_\-reg \hyperlink{image_8c_5c2b590ca1926edfeea3dc4c49370402}{Image\_\-meta} \mbox{[}$\,$\mbox{]}
\end{CompactItemize}


\subsection{Function Documentation}
\hypertarget{image_8c_e0902849e67c4fc1df9e0a5bc9b839e2}{
\index{image.c@{image.c}!fillImageRect@{fillImageRect}}
\index{fillImageRect@{fillImageRect}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static void fillImageRect (Color {\em color}, \/  int {\em x0}, \/  int {\em y0}, \/  int {\em width}, \/  int {\em height}, \/  OSL\_\-IMAGE $\ast$ {\em image})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{image_8c_e0902849e67c4fc1df9e0a5bc9b839e2}


\hypertarget{image_8c_104fc3827f35ec7e8c6b0e1f41067f5c}{
\index{image.c@{image.c}!Image\_\-blit@{Image\_\-blit}}
\index{Image\_\-blit@{Image\_\-blit}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Image\_\-blit (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{image_8c_104fc3827f35ec7e8c6b0e1f41067f5c}


\hypertarget{image_8c_5d7ff26d7f5fadbd7729d4c69857d850}{
\index{image.c@{image.c}!Image\_\-center@{Image\_\-center}}
\index{Image\_\-center@{Image\_\-center}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Image\_\-center (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{image_8c_5d7ff26d7f5fadbd7729d4c69857d850}


\hypertarget{image_8c_90d6eaa406de4d1fb8d522a92154631b}{
\index{image.c@{image.c}!Image\_\-clear@{Image\_\-clear}}
\index{Image\_\-clear@{Image\_\-clear}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Image\_\-clear (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{image_8c_90d6eaa406de4d1fb8d522a92154631b}


\hypertarget{image_8c_b9055332b7ce0d3c18d2ac94c04bebd1}{
\index{image.c@{image.c}!Image\_\-createEmpty@{Image\_\-createEmpty}}
\index{Image\_\-createEmpty@{Image\_\-createEmpty}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Image\_\-createEmpty (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{image_8c_b9055332b7ce0d3c18d2ac94c04bebd1}


\hypertarget{image_8c_3fbcdcfa071024d303a58750e17495cb}{
\index{image.c@{image.c}!Image\_\-creatsprite@{Image\_\-creatsprite}}
\index{Image\_\-creatsprite@{Image\_\-creatsprite}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Image\_\-creatsprite (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{image_8c_3fbcdcfa071024d303a58750e17495cb}


\hypertarget{image_8c_6c91cdf48a05c4fe12fc86d25071ca59}{
\index{image.c@{image.c}!Image\_\-drawLine@{Image\_\-drawLine}}
\index{Image\_\-drawLine@{Image\_\-drawLine}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Image\_\-drawLine (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{image_8c_6c91cdf48a05c4fe12fc86d25071ca59}


\hypertarget{image_8c_0960ec8d6d75c4ee8baa2a61d169ea43}{
\index{image.c@{image.c}!Image\_\-fillRect@{Image\_\-fillRect}}
\index{Image\_\-fillRect@{Image\_\-fillRect}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Image\_\-fillRect (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{image_8c_0960ec8d6d75c4ee8baa2a61d169ea43}


\hypertarget{image_8c_fff3ac1e94ec9f678514f31c14b455be}{
\index{image.c@{image.c}!Image\_\-free@{Image\_\-free}}
\index{Image\_\-free@{Image\_\-free}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Image\_\-free (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{image_8c_fff3ac1e94ec9f678514f31c14b455be}


\hypertarget{image_8c_f9e702ccbcc35fa86f8c20ec51cbe441}{
\index{image.c@{image.c}!Image\_\-getpixel@{Image\_\-getpixel}}
\index{Image\_\-getpixel@{Image\_\-getpixel}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Image\_\-getpixel (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{image_8c_f9e702ccbcc35fa86f8c20ec51cbe441}


\hypertarget{image_8c_f56bb70500e344941832525cd0377142}{
\index{image.c@{image.c}!Image\_\-height@{Image\_\-height}}
\index{Image\_\-height@{Image\_\-height}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Image\_\-height (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{image_8c_f56bb70500e344941832525cd0377142}


\hypertarget{image_8c_48e544c0bf9cd95b63c9dd6a5f0a18e0}{
\index{image.c@{image.c}!Image\_\-loadfrommemory@{Image\_\-loadfrommemory}}
\index{Image\_\-loadfrommemory@{Image\_\-loadfrommemory}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Image\_\-loadfrommemory (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{image_8c_48e544c0bf9cd95b63c9dd6a5f0a18e0}


\hypertarget{image_8c_6d3bc5433258ccc00d31828bd4d8c9dd}{
\index{image.c@{image.c}!Image\_\-pixel@{Image\_\-pixel}}
\index{Image\_\-pixel@{Image\_\-pixel}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Image\_\-pixel (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{image_8c_6d3bc5433258ccc00d31828bd4d8c9dd}


\hypertarget{image_8c_ce53d641673eb97b0189d5ad4a0c1ae6}{
\index{image.c@{image.c}!Image\_\-reset@{Image\_\-reset}}
\index{Image\_\-reset@{Image\_\-reset}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Image\_\-reset (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{image_8c_ce53d641673eb97b0189d5ad4a0c1ae6}


\hypertarget{image_8c_e51e70406630f87c198eab3eb3c1e1a6}{
\index{image.c@{image.c}!Image\_\-resize@{Image\_\-resize}}
\index{Image\_\-resize@{Image\_\-resize}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Image\_\-resize (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{image_8c_e51e70406630f87c198eab3eb3c1e1a6}


\hypertarget{image_8c_1158cfdee9cfbaeddc34518dc8b8bcdd}{
\index{image.c@{image.c}!Image\_\-rotate@{Image\_\-rotate}}
\index{Image\_\-rotate@{Image\_\-rotate}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Image\_\-rotate (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{image_8c_1158cfdee9cfbaeddc34518dc8b8bcdd}


\hypertarget{image_8c_3c6b48273d08398dd0fcf1f2bcc5fdaa}{
\index{image.c@{image.c}!Image\_\-save@{Image\_\-save}}
\index{Image\_\-save@{Image\_\-save}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Image\_\-save (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{image_8c_3c6b48273d08398dd0fcf1f2bcc5fdaa}


\hypertarget{image_8c_0c5d3fc9d20cf9c11cec3a97ca245f9a}{
\index{image.c@{image.c}!Image\_\-swizzle@{Image\_\-swizzle}}
\index{Image\_\-swizzle@{Image\_\-swizzle}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Image\_\-swizzle (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{image_8c_0c5d3fc9d20cf9c11cec3a97ca245f9a}


\hypertarget{image_8c_959c078ad1170387587009dd2c7504a9}{
\index{image.c@{image.c}!Image\_\-toram@{Image\_\-toram}}
\index{Image\_\-toram@{Image\_\-toram}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Image\_\-toram (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{image_8c_959c078ad1170387587009dd2c7504a9}


\hypertarget{image_8c_bdc3a73395d49b9f2b9dec7b21465307}{
\index{image.c@{image.c}!Image\_\-tovram@{Image\_\-tovram}}
\index{Image\_\-tovram@{Image\_\-tovram}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Image\_\-tovram (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{image_8c_bdc3a73395d49b9f2b9dec7b21465307}


\hypertarget{image_8c_e185825ad9d0a19f9a51e24520899f11}{
\index{image.c@{image.c}!Image\_\-unswizzle@{Image\_\-unswizzle}}
\index{Image\_\-unswizzle@{Image\_\-unswizzle}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Image\_\-unswizzle (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{image_8c_e185825ad9d0a19f9a51e24520899f11}


\hypertarget{image_8c_e8bdbeeda44d3884ea14fa36d54c237f}{
\index{image.c@{image.c}!Image\_\-width@{Image\_\-width}}
\index{Image\_\-width@{Image\_\-width}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Image\_\-width (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{image_8c_e8bdbeeda44d3884ea14fa36d54c237f}


\hypertarget{image_8c_edd0fcd77f62ef3e5689e2c3f4b37b17}{
\index{image.c@{image.c}!imagetoimage@{imagetoimage}}
\index{imagetoimage@{imagetoimage}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static void imagetoimage (int {\em sx}, \/  int {\em sy}, \/  int {\em width}, \/  int {\em height}, \/  OSL\_\-IMAGE $\ast$ {\em source}, \/  int {\em dx}, \/  int {\em dy}, \/  OSL\_\-IMAGE $\ast$ {\em destination})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{image_8c_edd0fcd77f62ef3e5689e2c3f4b37b17}


\hypertarget{image_8c_ddbbada1051b78058939a383c36187ae}{
\index{image.c@{image.c}!tocolor@{tocolor}}
\index{tocolor@{tocolor}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned int tocolor (lua\_\-State $\ast$ {\em L}, \/  int {\em a})}}
\label{image_8c_ddbbada1051b78058939a383c36187ae}


\hypertarget{image_8c_da1cd9463f9d6542c5fb48aaa76d9b32}{
\index{image.c@{image.c}!UserdataRegister@{UserdataRegister}}
\index{UserdataRegister@{UserdataRegister}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}UserdataRegister (Image, \/  {\bf Image\_\-methods}, \/  {\bf Image\_\-meta})}}
\label{image_8c_da1cd9463f9d6542c5fb48aaa76d9b32}


\hypertarget{image_8c_08eafae0a81701ffc4008618c33217ce}{
\index{image.c@{image.c}!UserdataStubs@{UserdataStubs}}
\index{UserdataStubs@{UserdataStubs}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}UserdataStubs (Image, \/  OSL\_\-IMAGE $\ast$)}}
\label{image_8c_08eafae0a81701ffc4008618c33217ce}




\subsection{Variable Documentation}
\hypertarget{image_8c_5c2b590ca1926edfeea3dc4c49370402}{
\index{image.c@{image.c}!Image\_\-meta@{Image\_\-meta}}
\index{Image\_\-meta@{Image\_\-meta}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const luaL\_\-reg {\bf Image\_\-meta}\mbox{[}$\,$\mbox{]}\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{image_8c_5c2b590ca1926edfeea3dc4c49370402}


\textbf{Initial value:}

\begin{Code}\begin{verbatim} {
        {"__gc", Image_free},
        {0,0}
}
\end{verbatim}
\end{Code}
\hypertarget{image_8c_736ee56c38d79cb024a48d061c0d82c4}{
\index{image.c@{image.c}!Image\_\-methods@{Image\_\-methods}}
\index{Image\_\-methods@{Image\_\-methods}!image.c@{image.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const luaL\_\-reg {\bf Image\_\-methods}\mbox{[}$\,$\mbox{]}\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{image_8c_736ee56c38d79cb024a48d061c0d82c4}


\textbf{Initial value:}

\begin{Code}\begin{verbatim} {
        {"load", Image_load},
        {"createEmpty", Image_createEmpty},
        {"blit", Image_blit},
        {"fillRect", Image_fillRect},
        {"drawLine", Image_drawLine},
        {"setPixel", Image_pixel},
        {"getPixel", Image_getpixel},
        {"width", Image_width},
        {"height", Image_height},
        {"resize", Image_resize},
        {"rotate", Image_rotate},
        {"center", Image_center},
        {"reset", Image_reset},
        {"clear", Image_clear},
        {"loadFromMemory", Image_loadfrommemory},
        {"free", Image_free},
        {"creatsprite", Image_creatsprite},
        {"unswizzle", Image_unswizzle},
        {"swizzle", Image_swizzle},
        {"toVRam", Image_tovram},
        {"toRam", Image_toram},
        {"save", Image_save},
        {0,0}
}
\end{verbatim}
\end{Code}
