TexInfo baseclass variables/properties/methods. Cannot be initialised.
예제 #1
0
        public static Bitmap BetterDDSCheck(abstractTexInfo tmpTex, byte[] imgData)
        {
            Bitmap retval = null;
            using (ResILImageBase img = ResILImageBase.Create(imgData))
            {
                tmpTex.NumMips = img.Mips;
                tmpTex.Format = img.SurfaceFormat.ToString();

                
                if (tmpTex.Format == "None")
                {
                    if (((ResILImage)img).MemoryFormat == ResIL.Unmanaged.DataFormat.RGBA)
                        tmpTex.Format = "ARGB";
                }

                
                try
                {
                    retval = img.ToWinFormsBitmap();
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.Message);
                } 
            }
            
            return retval;
        }
예제 #2
0
 public static Bitmap DDSCheck(abstractTexInfo tmpTex, byte[] data)
 {
     DDSPreview dds = new DDSPreview(data);
     tmpTex.NumMips = (int)dds.NumMips;
     tmpTex.Format = dds.FormatString;
     byte[] datat = dds.GetMipData();
     Bitmap retval = DDSImage.ToBitmap(datat, (dds.FormatString == "G8") ? DDSFormat.G8 : dds.Format, (int)dds.Width, (int)dds.Height);
     dds = null;
     return retval;
 }