November 12th 2016 & 1.0 & Initial creation of document\\
... & ... & ... \\
\bottomrule
\end{tabularx}
\end{table}
\newpage
\pagenumbering{arabic}
\section{Introduction}
This document describes the internal workings of each module implemented as a part of Gifitti. Described are the methods, input/output, as well as any
environment and state variables that the module uses. This document will continue to be updated as more methods and functionalities are added to each module.
\section{Module Declarations}
This section simply lists the modules used by Gifitti. More details on these modules (and how they interact) can be found in the MG document.
Since the hardware hiding module is implemented through the OS and is not actually coded as part of Gifitti, there is nothing to add to the MIS.
\subsection{Behavior-Hiding Module}
This module serves as a communication layer between the hardware-hiding module and the software decision module. This module covers M4.M5, and M8. Again, this module is not actually coded so there is nothing to add to the MIS.
\subsection{Software Decision Module}
This module includes any data structures and algorithms used in the system that do not provide direct interaction with the user. This module covers M7, and M6. Again, ths module is not actually coded so there is nothing to add to the MIS.
\subsection{Image Loading Module}
This module allows for the conversion of system paths to images in a usable form within the software.
\subsubsection{Variables}
\begin{enumerate}
\item Filepath (Input)
\item Image (Output)
\end{enumerate}
\subsubsection{Methods}
\begin{enumerate}
\item GetFilePath(OpenFileDialog o)\\This method uses an open file dialog menu within C\# in order to allow the user to select a file (path). This file path is then stored within the FilePath variable.
\item LoadImage(string FilePath) \\This method takes as input the filepath and converts it to an image file type using M4. This image is saved in the Image variable.
\end{enumerate}
\subsection{Image Processing Module}
This module converts the input images into a system usable form.
\subsubsection{Variables}
\begin{enumerate}
\item Image (Input)
\end{enumerate}
\subsubsection{Methods}
\begin{enumerate}
\item ConvertTo(FileType ft, Image f)\\This method will take as input a filetype and an image and convert the image to the file type requested. This result is then returned.
\item GetFileType(Image f)\\This method will return the file type of the image passed as input.
\end{enumerate}
\subsection{Image Conversion Module}
This module converts the GIF from a GIF Model (M8) to an image exportable by the system (GIF, TIFF, JPEG, PNG, BMP).
\subsubsection{Variables}
\begin{enumerate}
\item allowedFileTypes[]
\item curLoadedGIF (Input)
\item outputImage (Output)
\end{enumerate}
\subsubsection{Methods}
\begin{enumerate}
\item exportGIF(FileType ft) \\ This will be a public method which will call ConvertTo and return the result of that (if ft is in allowedFileTypes[]).
\item ConvertTo(FileType ft)\\This method will take as input a filetype and convert curLoadedGIF to that file type. This result is then returned.
\item GetFileType()\\This method will return the file type of the curLoadedGIF.
\end{enumerate}
\subsection{GIF Transformation Module}
This module handles frame by frame manipulation of the GIF Models (M8) in order to complete operations such as resizing and modifiyng the speed, etc. All
the methods and variables of this module are listed below.
\subsubsection{Variables}
\begin{enumerate}
\item curLoadedGIF (Input)
\end{enumerate}
\subsubsection{Methods}
\begin{enumerate}
\item Reset()\\This method will reset the curLoadedGIF to its original state when loaded into the program.
\item Resize(int x, int y)\\This method will resize the GIF to the size passed as parameters.
\item AddFrame(Frame[] f)\\This method will add to the GIF the frames passed as parameters.
\item RemoveFrame(Frame[] f)\\This method will remove from the GIF the frames passed as parameters.
\item Rotate(int x)\\This method will rotate the GIF by the input value in degrees.
\item ChangeSpeed(int x)\\Thie method will alter the speed of the GIF by the value passed as a parameter.
\end{enumerate}
\subsection{GIF Model Module}
This module represents a GIF object within the system. It contains methods and properties that allow the system to properly manipulate the GIF.
\subsubsection{Variables}
\begin{enumerate}
\item Frames[]
\item Speed
\item FileType
\item FilePath (Input)
\end{enumerate}
\subsubsection{Methods}
\begin{enumerate}
\item GetFrames()\\This method will return the GIF as an array of frames.
\item Play()\\This method will play the GIF by looping through the frames array.
\item Stop()\\This method will stop all playback of the GIF.
\item GetFilePath\\This method will return the filepath(name) as a string.
\end{enumerate}
\subsection{View-Model Module}
This module links views to the ViewModels using C\# partial class declarations to seperate view-model, and view aspects of the system.
\subsubsection{Variables}
\begin{enumerate}
\item curView
\item views[]
\end{enumerate}
\subsubsection{Methods}
\begin{enumerate}
\item getView()\\This method will return the current view.
\item changeView(View v)\\This method will change the view to the input view v.