Exemplo n.º 1
0
        public static Bitmap Load_TIL(byte[] tbtdata)
        {
            BinaryReader binaryReader = new BinaryReader((Stream) new MemoryStream(tbtdata));
            int          num1         = (int)binaryReader.ReadInt16();
            int          num2         = (int)binaryReader.ReadInt16();

            int[] numArray = new int[num1 + 1];
            int   num3     = 4 + numArray.Length * 4;

            for (int index = 0; index <= num1; ++index)
            {
                numArray[index] = num3 + binaryReader.ReadInt32();
            }
            for (int index = 0; index < num1; ++index)
            {
                binaryReader.BaseStream.Seek((long)numArray[index], SeekOrigin.Begin);
                int num4 = (int)binaryReader.ReadByte();
                ImageConvert.L1Image l1Image = ImageConvert.LoadImage(binaryReader.ReadBytes(numArray[index + 1] - (int)binaryReader.BaseStream.Position), 24, 24);
                if (l1Image.image != null)
                {
                    l1Image.image.Save(string.Format("E:\\Temp\\{0:x4}.bmp", (object)index), ImageFormat.Bmp);
                }
            }
            binaryReader.Close();
            return((Bitmap)null);
        }
Exemplo n.º 2
0
        public static ImageConvert.L1Image LoadImage(byte[] data, int width, int height)
        {
            Bitmap   bitmap   = new Bitmap(width, height);
            Graphics graphics = Graphics.FromImage((Image)bitmap);

            ImageConvert.L1Image l1Image = ImageConvert.LoadImage(data);
            if (l1Image.image != null)
            {
                graphics.DrawImageUnscaled((Image)l1Image.image, l1Image.x_offset, l1Image.y_offset);
            }
            l1Image.image = bitmap;
            return(l1Image);
        }
Exemplo n.º 3
0
 public static Bitmap Load_TBT(byte[] tbtdata)
 {
     return(ImageConvert.LoadImage(tbtdata).image);
 }