Exemplo n.º 1
0
        public static void ExtractAllTextures(string Folder)
        {
            if (Room == null)
            {
                return;
            }

            Dictionary <string, RooFile.MaterialInfo> textures = Room.GetMaterialInfos();
            BgfBitmap bgfbmp;
            Bitmap    bmp;

            foreach (KeyValuePair <string, RooFile.MaterialInfo> obj in textures)
            {
                bgfbmp = obj.Value.Texture;

                if (bgfbmp == null)
                {
                    continue;
                }

                bmp = bgfbmp.GetBitmap();
                bmp.MakeTransparent(Color.Cyan);
                bmp.Save(Folder + '/' + obj.Value.TextureName, ImageFormat.Png);
                bmp.Dispose();
            }
        }