private void ConvertToc16PlusI4(Bitmap imageToConvert)
        {
            //split image in half
            Bitmap c16, i4;

            c16 = i4 = new Bitmap(imageToConvert.Width, imageToConvert.Height / 2);
            Rectangle rect = new Rectangle(0, 0, imageToConvert.Width, imageToConvert.Height / 2);

            c16  = imageToConvert.Clone(rect, imageToConvert.PixelFormat);
            rect = new Rectangle(0, imageToConvert.Height / 2, imageToConvert.Width, imageToConvert.Height / 2);
            i4   = imageToConvert.Clone(rect, imageToConvert.PixelFormat);

            ImageCoder c16ImageCoder = new ImageCoder();

            c16ImageCoder = new N64ImageViewer.ImageCoder();
            c16ImageCoder.ConvertToC16(c16);
            ImageCoder i4ImageCoder = new ImageCoder();

            i4ImageCoder.ConvertToI4(i4);
            n64ImageType = N64ImageType.c16PlusI4;
            List <byte> tempData = new List <byte>();

            tempData.AddRange(c16ImageCoder.Data);
            tempData.AddRange(i4ImageCoder.Data);
            Data  = tempData.ToArray();
            Width = imageToConvert.Width;
            // Height is used for both the C16 and I4 so we need to split it in half, since each image makes up half
            Height   = imageToConvert.Height / 2;
            HasAlpha = c16ImageCoder.HasAlpha;
            return;
        }
        /// <summary>
        /// Converts given ObjFile.imageToConvert into N64 texture
        /// </summary>
        /// <param name="imageToConvert">imageToConvert to convert</param>
        public void Convert(Bitmap imageToConvert, bool checkC16I4 = true)
        {
            // C16-I4 Check, Pretty hacky...
            if (checkC16I4 && imageToConvert.Height % 2 == 0)
            {
                //even height, split it in half
                Bitmap c16, i4;
                c16 = i4 = new Bitmap(imageToConvert.Width, imageToConvert.Height / 2);
                Rectangle rect = new Rectangle(0, 0, imageToConvert.Width, imageToConvert.Height / 2);
                c16  = imageToConvert.Clone(rect, imageToConvert.PixelFormat);
                rect = new Rectangle(0, imageToConvert.Height / 2, imageToConvert.Width, imageToConvert.Height / 2);
                i4   = imageToConvert.Clone(rect, imageToConvert.PixelFormat);

                ImageCoder c16ImageCoder = new ImageCoder();
                c16ImageCoder = new N64ImageViewer.ImageCoder();
                c16ImageCoder.Convert(c16, false);
                ImageCoder i4ImageCoder = new ImageCoder();
                i4ImageCoder.Convert(i4, false);
                if (c16ImageCoder.n64ImageType.Equals(N64ImageType.c16) && i4ImageCoder.n64ImageType.Equals(N64ImageType.i4))
                {
                    n64ImageType = N64ImageType.c16PlusI4;
                    List <byte> tempData = new List <byte>();
                    tempData.AddRange(c16ImageCoder.Data);
                    tempData.AddRange(i4ImageCoder.Data);
                    Data     = tempData.ToArray();
                    Width    = imageToConvert.Width;
                    Height   = imageToConvert.Height / 2; // Height is used for both the C16 and I4 so we need to split it in half, since each image makes up half
                    HasAlpha = c16ImageCoder.HasAlpha;
                    return;
                }
            }
            //End C16-I4 check
            try
            {
                SetupCoder(imageToConvert);
                if (IsGrayscale == true)
                {
                    if (HasAlpha == true)
                    {
                        /* Convert to IA */
                        if (UniqueColors.Count <= 16)
                        {
                            ConvertToia8(imageToConvert);
                        }
                    }
                    else
                    {
                        /* Convert to I */
                        if (UniqueColors.Count <= 16)
                        {
                            ConvertToI4(imageToConvert);
                        }
                        else if (UniqueColors.Count <= 256 && imageToConvert.Width * imageToConvert.Height <= 4096)
                        {
                            ConvertToI8(imageToConvert);
                        }
                        else
                        {
                            /* Uh-oh, too many grayshades OR invalid size! */
                            throw new Exception("Too many grayshades in texture OR invalid size");
                        }
                    }
                }
                else
                {
                    /* Convert to CI */
                    if (UniqueColors.Count <= 16)
                    {
                        ConvertToCi4(imageToConvert);
                    }
                    else if (UniqueColors.Count <= 256)
                    {
                        ConvertToCi8(imageToConvert);
                    }
                    else
                    {
                        ConvertToC16(imageToConvert);
                    }
                }
            }
            catch (Exception ex)
            {
                //   System.Windows.Forms.MessageBox.Show("imageToConvert '" + imageToConvert.DisplayName + "': " + ex.Message, "Exception", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Exclamation);
                //  SetInvalidTexture(imageToConvert);
            }

            /* Pack texture type */
            Type = (byte)((Format << 5) | (Size << 3));
        }