Esempio n. 1
0
        private void ImportImage(string path)
        {
            _entry.Dirty = true;
            Image newImage = Image.FromFile(path);

            ImageVisible      = false;
            TabsVisible       = false;
            ImageMenuVisible  = false;
            BinaryMenuVisible = false;

            ImageHeader header = GameImage.GetImageHeader(_entry.EntryBlocks[0].Data);

            ImageInfo info = GameImage.SetImage(newImage, header.CompressionType);

            Entry.EntryBlocks[0].Data = info.Header;
            Entry.EntryBlocks[1].Data = info.Data;

            ImageVisible      = false;
            TabsVisible       = false;
            ImageMenuVisible  = false;
            BinaryMenuVisible = false;
            Task.Run(() => UpdateDisplay());
        }